-   Linux - Newbie (
-   -   Combine cron with shutdown? (

jeopardyracing 11-13-2004 12:16 AM

Combine cron with shutdown?
I'm considering adding the following bash alias to my bash profile to run at the end of a day's work on my HD Knoppix-powered dell laptop:

alias endday='daily; sleep 30; shutdown -h +3'

where 'daily' is actually another alias to run daily cron (I haven't bothered with setting up anacron.)

Question: if I do this, can I be sure that the daily cron will be completely run prior to the system running 'sleep 30 or 'shutdown'? ie do commands run like this run purely sequentially? I want to be sure the system won't begin a shutdown or save its user lockout file during the shutdown if cron is still running.

Tinkster 11-13-2004 12:21 AM

How about
daily && shutdown -h +3

shutdown will only happen if daily succeeded.


jeopardyracing 11-13-2004 08:51 AM

That works!

Tinkster 11-13-2004 01:56 PM

Pleasure :)


All times are GMT -5. The time now is 08:34 AM.