Solved

Regarding Cron job in Unix/Linux

Posted on 2011-09-13
6
318 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
Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

 

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

Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
EXCHANGE, ACTIVE DIRECTORY 4 65
get remote physical servers and platforms 5 52
Call Shell Script from Perl Script 6 99
add some character at the end of line in vi 7 79
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 …
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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.:
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

770 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