?
Solved

Regarding Cron job in Unix/Linux

Posted on 2011-09-13
6
Medium Priority
?
329 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 9

Accepted Solution

by:
meko72 earned 2000 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
Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

 

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
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.:
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses
Course of the Month11 days, 9 hours left to enroll

752 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