LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-09-2006, 12:56 PM   #1
GavB
Member
 
Registered: Nov 2006
Posts: 54

Rep: Reputation: 15
Trouble with cron


Hi, hope youre all well.

I am pretty new to Linux so sorry if this has been discussed before.

I am basically trying to run a script every x minutes as a cron (cron.sh) but it doesn't seem to work, I have tried the following:

* * * * * /path/to/script/cron.sh

and

* * * * * sh /path/to/script/cron.sh

but none seem to work :/

Is there something that I'm missing? I am using CentOS 4.4 if that makes a difference.

Thanks for your help!

Gav
 
Old 11-09-2006, 01:39 PM   #2
macemoneta
Senior Member
 
Registered: Jan 2005
Location: Manalapan, NJ
Distribution: Fedora x86 and x86_64, Debian PPC and ARM, Android
Posts: 4,593
Blog Entries: 2

Rep: Reputation: 344Reputation: 344Reputation: 344Reputation: 344
The first format is correct. I assume you are adding the cron job with the 'crontab -e' command. Does your script specify fully qualified paths to executables? Remember that cron jobs are not running with the login environment variables, and that includes the PATH.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can any one plz explain why/what for cron.d, cron.daily, cron.weekly etc are there. mavinashbabu Linux - Newbie 4 09-21-2006 01:50 PM
bash script causes trouble with cron Suinatsa Programming 10 06-14-2006 03:20 AM
upgrade trouble (exim4 + mutt + cron) naruto273 Debian 5 03-09-2006 12:10 PM
How to trouble shoot cron jobs ? bowie101 Linux - General 3 01-26-2006 11:34 AM
Trouble with perl script in Cron job thack111 Linux - General 7 11-25-2004 02:44 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:46 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration