Regarding Cron job in Unix/Linux


Is there a way to prevent a cron job from stopping when the server reboots. Because sometimes system people are rebooting without notice and the job is not getting done.

If the server reboots, can it automatically start the job again

Any further inputs/suggestions are welcome....
Who is Participating?
meko72Connect With a Mentor Commented:
new_perl_userAuthor Commented:
Thank you for the link. So it says that @reboot variable will invoke this script whenever the system reboots.

But does it have the capacity to take over from where it stopped the script or  will it start executing the script from the start again.
It will start the script again.
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

new_perl_userAuthor Commented:
could we get an alert message through this like an email:

Cron started after the reboot.  

so that  I can go and check if everything is running as expected. Because last time system people rebooted and did not update me regarding reboot  and by the time I went to check  script created a mess.
you can do it in the second script that called while reboot.
You need to use anacron in place or together wit cron.
It does exactly what you want.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.