04-09-2011
if it works in command line but not when scheduled in crontab, it is more than likely an environment issue.
Make sur you load the required environment variable from within your script.
(or a make script that load the environment variable and then launch th python pgm within that environment )
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
How can I configure cron file , to execute a script on evey alternate saturdays ?
I am using AIX 5.0 machine
Thanks in advance
Shihab (1 Reply)
Discussion started by: shihabvk
1 Replies
2. UNIX for Dummies Questions & Answers
hello there,
i'm learning about task scheduling with cron and all seems hyper exciting, yeppie. But there is a prob:
assume i have a script that needed to be executed at 7am everyday. I could do:
vi mycron
00 7 * * * echo hi mother, i wanna be a script daddy.
:wq
crontab mycron
how... (4 Replies)
Discussion started by: alikun
4 Replies
3. HP-UX
Hi all,
i want a job to run first monday of every of month. (1 Reply)
Discussion started by: megh
1 Replies
4. UNIX for Dummies Questions & Answers
Below are two cron entries. what is the difference beteeen writing 20 and */20? how is "20 * * * *" different from "*/20 * * * *"?
1) 20 * * * * find /tmp/ -name "*.log.*" ! -name "*.gz" -mmin +1440 -exec gzip '{}' \;
2) */20 * * * * find /tmp/ -name "*.tmp.*" ! -name "*.gz" -mmin +1440... (6 Replies)
Discussion started by: niks
6 Replies
5. UNIX for Advanced & Expert Users
Is there a way in AIX to schedule a script to run bi-weekly through cron?
I have a script that needs to run every other Wednesday, and this is what I thought I had to enter in the crontab file:
00 08 * * 3/2 /home/user/user.script
It didn't like that. It reports a syntax error. I'm almost... (5 Replies)
Discussion started by: LPT
5 Replies
6. Shell Programming and Scripting
Hello All,
I want to run a script for every 5 minutes interval.So i developed a script which has to be scheduled to run for every 5 minutes. That script internally runs another script. But the problem is it is not executing properly. Can anybody throw some light on this.
Below are the code... (4 Replies)
Discussion started by: RSC1985
4 Replies
7. UNIX for Dummies Questions & Answers
How do I start, restart and stop the cron service under Slackware 12? (1 Reply)
Discussion started by: proactiveaditya
1 Replies
8. Shell Programming and Scripting
Hi All,
I have a script which is scheduled in the Cron. It runs every 10th and 40th min of an hour.The job has to run every 30min.
But, I do not want to have the 00:10 MST run every day.Is it possible to exclude that run from the schedule?Or any other way through which i can run my job every... (4 Replies)
Discussion started by: sparks
4 Replies
9. UNIX for Dummies Questions & Answers
I have a script that backs up a directory, creates a log file and mails the log file to us.
find . -print | backup -ivqf/dev/rmt0 | tee backup.log
cat backup.log|mail -v -s "Tape backup log" maillist
This script works fine from the console.
When I schedule it in cron, I never get the... (1 Reply)
Discussion started by: landog
1 Replies
10. Red Hat
Hi Everybody,
I want to run a script at every 5 seconds. I know how to run it every 5 minutes, is there any possibility to run a script at 5 seconds interval.
Regards,
Mastan (3 Replies)
Discussion started by: mastansaheb
3 Replies
CRON(8) System Manager's Manual CRON(8)
NAME
cron - daemon to execute scheduled commands (Vixie Cron)
SYNOPSIS
cron
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 '&'.
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.
SEE ALSO
crontab(1), crontab(5)
AUTHOR
Paul Vixie <paul@vix.com>
4th Berkeley Distribution 20 December 1993 CRON(8)