12-19-2005
Din't get how to use it in my script
Hi Perderabo,
I dint get how can I use this in my script.
This is the cron for my current script
00,05,10,15,20,25,30,35,40,45,50,55 * * * * . $HOME/db-bin/controller.sh
This script is currently every 5 minutes.
In this script I call, three other shell scripts.
NOw, How do i schedule a cron. And if from the above method, no cron is needed, how will i take care if the script has exited abruptly?
What I thought was, I can scehdule a cron for every minute.i.e the Interval cannot be less than a minute.
Then I can log the last_run_time in the database and run it if the interval from the last run time is completed.
Thanks,
Rahul.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello
I am trying to create a dynamic ksh script and I have an issue.
I have a script a.ksh and it has got the following lines (for example)
#!/bin/ksh
# trace mode +x : without trace -x : with trace
set +xv
echo hi, i am going to create a dynamic script now
cat >> dynamic.ks <<EOF... (2 Replies)
Discussion started by: sundarkumars
2 Replies
2. Shell Programming and Scripting
Hi,
I would like to edit an input data-file by changing a variable in it
in steps:
For ex: If my input file is 'big.in', then it has the following data:
2.54 0.01 0.5 0.0
My source code then reads this above line, executes and gives out some
output. Then ,
I want to increment... (1 Reply)
Discussion started by: habzone2007
1 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
I need to run a shell script with dynamic command in it like
# Begin script...
mysql xx "select * from tab" | sed 's/\t/|/g' > GENERATED_20100304.txt
the dynamic part is 20100304 which should be today's date, and it needs to run every day and create a new file with... (2 Replies)
Discussion started by: nuthalapati
2 Replies
7. 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
8. 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
9. Shell Programming and Scripting
Hi...
I am very new to shell scripting. I have written a script with help of this forum and some googling and it works the way I want it to. Currently this script checks for my SIP trunk registration every 5 seconds, if registration is not available then it reboots my router through telnet... (4 Replies)
Discussion started by: jeetz
4 Replies
10. Shell Programming and Scripting
Linux System having all Perl, Python, PHP (and Ruby) installed
From a Shell script, can call a Perl, Python, PHP (or Ruby ?) file
eg
eg
a Shell script run in a case statement call to run a php file, also Perl or/and Python file???
Like
#!/usr/bin/bash
....
....
case $INPUT_STRING... (1 Reply)
Discussion started by: hoyanet
1 Replies
LEARN ABOUT DEBIAN
script-email
SCRIPT-EMAIL(8) System Administration Commands SCRIPT-EMAIL(8)
NAME
script-email - Amanda script to send email notifications
DESCRIPTION
script-email is an Amanda script implementing the Script API. It should not be run by users directly. It sends a notification email to the
addresses specified in the MAILTO property.
PROPERTIES
This section lists the properties that control script-email's functionality. See amanda-scripts(7) for information on the Script API,
script configuration.
MAILTO
List of email addresses that will receive an email on command execution. It is a multi-valued property:
property "MAILTO" "amanda@domain.com" "sysadmin@domain.com" "amandauser@domain.com"
EXAMPLE
In this example, script-email is scheduled to be run before the DLE, on the server. The unqualified email address amanda will be passed to
the email system unchanged. The script is then attached to a dumptype, which can then be specified for any DLEs which require
notification.
define script-tool pre-email {
comment "email me before this DLE is backed up"
plugin "script-email"
execute-on pre-dle-backup
execute-where server
property "mailto" "amanda"
}
define dumptype user-tar-email {
user-tar
script "pre-email"
}
SEE ALSO
amanda(8), amanda.conf(5), amanda-client.conf(5), amanda-scripts(7)
The Amanda Wiki: : http://wiki.zmanda.com/
AUTHORS
Jean-Louis Martineau <martineau@zmanda.com>
Zmanda, Inc. (http://www.zmanda.com)
Dustin J. Mitchell <dustin@zmanda.com>
Zmanda, Inc. (http://www.zmanda.com)
Amanda 3.3.1 02/21/2012 SCRIPT-EMAIL(8)