Solved

Regarding Cron job in Unix/Linux

Posted on 2011-09-13
6
323 Views
Last Modified: 2013-11-22
Hi,

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.
Or

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

Any further inputs/suggestions are welcome....
0
Comment
Question by:new_perl_user
6 Comments
 
LVL 9

Accepted Solution

by:
meko72 earned 500 total points
ID: 36532152
0
 

Author Comment

by:new_perl_user
ID: 36532218
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.
0
 
LVL 9

Expert Comment

by:meko72
ID: 36532229
It will start the script again.
0
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.

 

Author Comment

by:new_perl_user
ID: 36532309
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.
0
 
LVL 5

Expert Comment

by:hossamshaaban
ID: 36535076
you can do it in the second script that called while reboot.
0
 
LVL 62

Expert Comment

by:gheist
ID: 36597482
You need to use anacron in place or together wit cron.
It does exactly what you want.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Background Still having to process all these year-end "csv" files received from all these sources (including Government entities), sometimes we have the need to examine the contents due to data error, etc... As a "Unix" shop, our only readily …
Utilizing an array to gracefully append to a list of EmailAddresses
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question