07-18-2014
So is what you are now asking for is a frequent poll and reboots at 10 minute intervals?
You have all you need really, you just have to adjust your logic and re-use what's been offered. Consider 600 seconds being a 120 x 5 second tests and code a loop accordingly. You'd be better trying and failing, then asking for help than asking for a ready made solution. You will then learn how things work and be better placed to support and adjust them in future.
Regards,
Robin
This User Gave Thanks to rbatte1 For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi All.
I have a script which has to be run periodically. The frequency of its run will be decided by a Database stored value PollRate.
e.g. If PollRate value is 300secs, then the script should be executed every 5 minutes, if it's 1500secs, it should execute every 15 minutes.
Is there... (5 Replies)
Discussion started by: rahulrathod
5 Replies
2. Shell Programming and Scripting
Hi friends,
I need to write a script which runs a command (on that particular server only) after every 10 mins, and the contents are also echoed on that very terminal only.
And then I need to compare the last two outputs, and mail if there is any difference in the last two outputs.
Can we set... (4 Replies)
Discussion started by: vikas027
4 Replies
3. Shell Programming and Scripting
Hi ,
I am working on the following script . I want this script to run and scan the log file repeatedly after 3 hours. This script will run & scan just for the current date logs and after every 3 hours. Kindly advice what to add in this script for this purpose.
#!/bin/sh
diff common.log... (3 Replies)
Discussion started by: himvat
3 Replies
4. Shell Programming and Scripting
I am using Solaris 9. I wish to run my script every 1 minute inteval. Though i can run it using below entry in crontab.
* * * * /export/home/username/script/file_exist_&_run.sh
in short above script will check whether a specific file exist in a directory. If it found it will inovke another... (10 Replies)
Discussion started by: thepurple
10 Replies
5. UNIX for Dummies Questions & Answers
I have a script I want to run in the background, and I have looked it up but I am not exactly sure how to do. First of all to run it in the background do you have to put something in the script or is it just a command when you go to run it. I found this solution to it but once again I am not to... (2 Replies)
Discussion started by: mauler123
2 Replies
6. Shell Programming and Scripting
Hi,
I want to schedule a job to run every 15 mins through cron.
searched the forums and came up with this piece of code.i have given this in my crontab
0-59/15 * * * * sh /usr/ss/job
But its not being run. Have i made any mistake here.
Can any1 post the cron code for scheduling the... (5 Replies)
Discussion started by: suresh_kb211
5 Replies
7. Shell Programming and Scripting
Hi,
I have command that should run continuously for 30 mins but not every day not once in a week , not one in a month. whenever i call that particular program that command should run for 30 mins and stop.
#Contents of test.pl
`ls -l *.txt`;
#some other lines of code to print
... (1 Reply)
Discussion started by: vanitham
1 Replies
8. Shell Programming and Scripting
Hi,
Can someone help me in running a cronjob everyday between 7 and 8 pm with the time interval of 5 minutes in between to repeat that script. The script is so small and I need that to run daily between this time. Please if possible provide me the syntax for this logic.
Thanks. (4 Replies)
Discussion started by: cya
4 Replies
9. Shell Programming and Scripting
Hi Friends,
I am newbie to shell programming and I am stuck trying to accomplish following task.We use Bamboo CI which executes script1 passing parameters. This Main script executes script2 as backend process as part of one of it statements. Task of script2 is to essentially check whether a... (0 Replies)
Discussion started by: aditya206
0 Replies
10. Shell Programming and Scripting
Hello,
Since I m new to shell, I had a hard time to sought out this problem.
I have a log file of a utility which tells that batch files are successful with timestamp. Given below is a part of the log file.
2013/03/07 00:13:50 Apache/1.3.29 (Unix) configured -- resuming normal operations... (12 Replies)
Discussion started by: rpm120
12 Replies
LEARN ABOUT OSX
pacemaker
PACEMAKER(8) BSD System Manager's Manual PACEMAKER(8)
NAME
pacemaker -- clock drift adjustment daemon
SYNOPSIS
pacemaker [-d drift] [-b] [-e error] [-a interval] [-i] [-v] [-n]
DESCRIPTION
pacemaker adjusts the system clock periodically to compensate for clock drift. The clock drift is normally computed by ntpd(8), which writes
a clock drift value in /var/db/ntp.drift. By default, pacemaker will call adjtime(2) once per second to slew the system clock. The daemon
is started by launchd(8) only when the drift file is present or has just been created in the file system. pacemaker detects changes in the
file and re-calculates clock adjustment values appropriately. The daemon will exit if the drift file is deleted and is not re-created within
one minute.
As a fail-safe mechanism, pacemaker will reset the system clock using settimeofday(2) if the system clock requires adjustment exceeding the
maximum value that can be accomodated by adjtime to slew the clock. In practice, this extreme case should never occur.
The -d option allows the specification of either a floating-point drift value, or the path name of an alternate drift file. If a floating
point drift value is specified, pacemaker will use the given value and will not read a drift file.
To reduce power consumption, especially when the system is using internal battery power, it may be desirable to reduce the frequency of calls
to adjust the system's clock drift. The -e and -a options, together with the -b flag allow several ways to control the clock adjustment fre-
quency.
The floating point value following -e specifies a maximum error tolerance in seconds for the system clock. For example, a value of 0.001
specifies that the clock drift adjustment should only be done frequently enough to keep the system clock error within one millisecond, based
on the current clock drift rate.
Alternatively, the clock adjustment frequency can be specified exactly as a value in seconds following -a.
When both -e error and -a interval are provided, pacemaker will choose to adjust the system clock either every interval seconds, or less fre-
quently if the clock error will remain within error seconds.
The settings for -e and/or -a may be specified for operation of the system while using an external power source, and specified independently
for operation using internal batteries. By default, the values for -e and/or -a are used for both power configurations. If the -b flag pre-
cedes -e and/or -a, then the following settings apply only when the system is using internal battery power.
For example, starting pacemaker with the following parameters will cause it to adjust the clock every 2 seconds when the system is using
external power. When running on battery power, it will adjust the clock no more than once every 10 seconds, or less frequently if the clock
error remains less than five milliseconds.
pacemaker -a 2 -b -a 10 -e 0.005
When invoked on the command-line with -i, pacemaker prints a summary of internal parameters and then exits. The -v flag causes pacemaker to
print copies of its log messages to standard error. Note that this requires running the program from the command line rather than from
launchd. -n causes pacemaker to run without actually attempting to adjust the system clock.
FILES
/var/db/ntp.drift default clock drift file
SEE ALSO
launchd(8), ntpd(8), adjtime(2), settimeofday(2).
HISTORY
The pacemaker daemon was introduced in OS X 10.9.
OS X
March 9, 2013 OS X