02-16-2011
This is one of the most common questions in the Unix for Dummies Forum and a
FAQ is written for this.
10 More Discussions You Might Find Interesting
1. Programming
i have shell script. when i run in normail mode..it run ok but when i use crontab command to set that program run in certain time it give an error.
error 'SQLPLUS cannot execute'
what the problem.i already set all the correct path and use both root and normal id but still cannot execute properly. (1 Reply)
Discussion started by: zikronz
1 Replies
2. Shell Programming and Scripting
Hi,
I need to execute a URL through crontab. Please could you help me to.
I need something like
15 0 * * * http://www.mysite.com/index.php.
Is it possible.
If not, how can I execute a script from another server..
Any help will be appritiatable.
Many thanks,
Nissar.P.K (2 Replies)
Discussion started by: nissar
2 Replies
3. UNIX for Dummies Questions & Answers
Hello!
I have an entry on my crontab.
10 00 * * * /bscsprod/bscs/prod/523/bin/tehcron.sh
$ /bscsprod/bscs/prod/523/bin/vi tehcron.sh
nohup teh -t -f > /dev/null &
~
~
~
~
~
~
~
~
"tehcron.sh" 13 lines, 365 characters
but executing the script from the... (5 Replies)
Discussion started by: Tris
5 Replies
4. UNIX for Dummies Questions & Answers
hello. we are porting over from HPUX Shell to Linux.
my default shell is bash so i can no longer schedule to execute a sh script in crontab.
can anyone pls help me out? I searched the site but didnt find any details.
thanks! (1 Reply)
Discussion started by: jigarlakhani
1 Replies
5. Shell Programming and Scripting
Anyone can help me ?
I try to using crontab with a simple shell script as echo it run okay but now i have more command in script. when I set entry to crontab and whe it run i get mail with error cannot execute binary file.
it urgent so please help me the soutions. Thank so much for your help.... (5 Replies)
Discussion started by: raccsdl
5 Replies
6. UNIX for Dummies Questions & Answers
Hi guys, my first post time here, so hello to everyone :)
I've got a problem running one of my scripts at work. I can get crontab working on simple scripts (i.e. one that just outputs date to a temp file). but it won't correctly execute the script i want to use.
My script is a PHP script. It... (6 Replies)
Discussion started by: renegadeice
6 Replies
7. Shell Programming and Scripting
Dear All
Here is the details what i want to achieve from shell scripts
I have a sever where 5 databases are created. which i having diffrent SID's.
Now i want to execute some SQL queries on each one of the databases. (SQL Query is same).That i want to acheive via crontab
Now each one of the... (2 Replies)
Discussion started by: jhon
2 Replies
8. Red Hat
Dear!
I've 2 scripts backup Oracle database in crontab environment, however, I found they did not execute. The cron is here
$ crontab -l
30 2 * * 0 sh /cloudbck/level0/level0.sh
19 3 * * * sh /cloudbck/level1/level1.sh
Then, I tried to find how did they not run by looking up... (8 Replies)
Discussion started by: trantuananh24hg
8 Replies
9. Red Hat
Greetings/
I have a script listed in my roots crontab
07 9 * * * /opt/HLRSDATA_2010_OCT/HLRS_Scheduler_sp.sh > /opt/HLRSDATA_2010_OCT/logs/HLRTKJob.log
This script contains the following
#!/bin/bash
echo HLRSData Scheduler
cd /opt/HLRSDATA_2010_OCT
/usr/bin/java -Xms32m -Xmx1024m -cp... (6 Replies)
Discussion started by: RedSpyder
6 Replies
10. Shell Programming and Scripting
Can someone please help me on how to schedule script to run every 45 days in crontab ?
Thanks,
Prince (5 Replies)
Discussion started by: prince1987
5 Replies
CRON(8) System Manager's Manual CRON(8)
NAME
cron - daemon to execute scheduled commands (ISC Cron V4.1)
SYNOPSIS
cron [-l load_avg] [-n]
DESCRIPTION
Cron should be started from /etc/rc or /etc/rc.local. It will return immediately, so you don't need to start it with '&'. The -n option
changes this default behavior causing it to run in the foreground. This can be useful when starting it out of init.
Cron searches /var/spool/cron for crontab files which are named after accounts in /etc/passwd; crontabs found are loaded into memory. Cron
also searches for /etc/crontab and the files in the /etc/cron.d directory, which are in a different format (see crontab(5)). Cron then
wakes up every minute, examining all stored crontabs, checking each command to see if it should be run in the current minute. When execut-
ing commands, any output is mailed to the owner of the crontab (or to the user named in the MAILTO environment variable in the crontab, if
such exists).
Additionally, cron checks each minute to see if its spool directory's modtime (or the modtime on /etc/crontab) has changed, and if it has,
cron will then examine the modtime on all crontabs and reload those which have changed. Thus cron need not be restarted whenever a crontab
file is modified. Note that the Crontab(1) command updates the modtime of the spool directory whenever it changes a crontab.
Daylight Saving Time and other time changes
Local time changes of less than three hours, such as those caused by the start or end of Daylight Saving Time, are handled specially. This
only applies to jobs that run at a specific time and jobs that are run with a granularity greater than one hour. Jobs that run more fre-
quently are scheduled normally.
If time has moved forward, those jobs that would have run in the interval that has been skipped will be run immediately. Conversely, if
time has moved backward, care is taken to avoid running jobs twice.
Time changes of more than 3 hours are considered to be corrections to the clock or timezone, and the new time is used immediately.
PAM Access Control
On SUSE LINUX systems, crond now supports access control with PAM - see pam(8). A PAM configuration file for crond is installed in
/etc/pam.d/crond . crond loads the PAM environment from the pam_env module, but these can be overriden by settings in the crontab file.
SIGNALS
On receipt of a SIGHUP, the cron daemon will close and reopen its log file. This is useful in scripts which rotate and age log files.
Naturally this is not relevant if cron was built to use syslog(3).
CAVEATS
In this version of cron, /etc/crontab must not be writable by any user other than root. No crontab files may be links, or linked to by any
other file. No crontab files may be executable, or be writable by any user other than their owner.
SEE ALSO
crontab(1), crontab(5), pam(8)
AUTHOR
Paul Vixie <vixie@isc.org>
4th Berkeley Distribution 10 January 1996" CRON(8)