Running a script at boot
akonstam at trinity.edu
akonstam at trinity.edu
Mon Aug 8 01:10:20 UTC 2005
On Sun, Aug 07, 2005 at 03:24:33PM -0500, Steven Stern wrote:
> Claude Jones wrote:
> >On Sun August 7 2005 3:35 pm, Steven Stern wrote:
> >
> >
> >>See "man 5 crontab"
> >>
> >> These special time specification "nicknames" are supported, which
> >> replace the 5 initial time and date fields, and are prefixed by
> >>the ?@?
> >> character:
> >> @reboot : Run once, at startup.
> >> @yearly : Run once a year, ie. "0 0 1 1 *".
> >> @annually : Run once a year, ie. "0 0 1 1 *".
> >> @monthly : Run once a month, ie. "0 0 1 * *".
> >> @weekly : Run once a week, ie. "0 0 * * 0".
> >> @daily : Run once a day, ie. "0 0 * * *".
> >> @hourly : Run once an hour, ie. "0 * * * *".
> >>
> >
> >
> >I just read this, because I'm interested as well. It raises a question.
> >Doesn't the Linux boot-sequence have a very specific ordering, with the
> >number values of each service determining their sequence in the stack, and
> >rc.local being last? If so, when does the script get executed using the
> >crontab @reboot method? There didn't seem to be anything in the man page
> >about that - am I missing something?
>
> in /etc/rc3.d, cron is started by S90cron. So, it runs very soon after
> cron starts. At startup, the "S" files are executed in order.
>
A much simpler way to run a script at boot is to put it in the
rc.local file.
--
=======================================================================
"It follows that any commander in chief who undertakes to carry out a plan
which he considers defective is at fault; he must put forth his reasons,
insist of the plan being changed, and finally tender his resignation rather
than be the instrument of his army's downfall."
-- Napoleon, "Military Maxims and Thought"
-------------------------------------------
Aaron Konstam
Computer Science
Trinity University
telephone: (210)-999-7484
More information about the fedora-list
mailing list