LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-19-2003, 02:10 AM   #1
herc
Member
 
Registered: Jul 2003
Posts: 90

Rep: Reputation: 15
Unhappy crontab's not working


Ok, I have inputted cronjobs correctly but it doesn't seem to do them, what might be wrong? (first time using cron)

Quote:
* */4 * * * /home/herc/pisg-0.49/pisg >/dev/null 2>&1

* */4 * * * /home/herc/pisg3/pisg >/dev/null 2>&1

*/10 * * * * /home/herc/eggdrop/script.tcl >/dev/null 2>&1
 
Old 12-19-2003, 03:25 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 66
Well you are pointing the output to /dev/null. Try putting it to a file then you may get an idea of what is wrong.
 
Old 12-19-2003, 07:43 PM   #3
camelrider
Member
 
Registered: Apr 2003
Location: Juneau, Alaska
Posts: 247

Rep: Reputation: 31
Also..If you type "mail" at a prompt in the home directory of the user whose crontab you're using you may find that cron has sent you some messages. (man mail)
 
Old 12-22-2003, 11:46 AM   #4
herc
Member
 
Registered: Jul 2003
Posts: 90

Original Poster
Rep: Reputation: 15
Hmm, I want to run pisg once in four hours and a tcl script once every 10 min, so are these right?

* 4 * * * /dir/pisg
10 * * * * /dir/something.tcl

And is it enough to crontab file.txt which has those included?
 
Old 12-22-2003, 12:08 PM   #5
herc
Member
 
Registered: Jul 2003
Posts: 90

Original Poster
Rep: Reputation: 15
btw, can you change the editor for crontab?
 
Old 12-31-2003, 10:01 AM   #6
TheOther1
Member
 
Registered: Feb 2003
Location: Atlanta, GA
Distribution: RHAS 2.1, RHEL3, RHEL4, SLES 8.3, SLES 9, SLES9_64, SuSE 9.3 Pro, Ubuntu, Gentoo
Posts: 335

Rep: Reputation: 32
Quote:
Originally posted by herc
Hmm, I want to run pisg once in four hours and a tcl script once every 10 min, so are these right?

* 4 * * * /dir/pisg
10 * * * * /dir/something.tcl

And is it enough to crontab file.txt which has those included?
If you want to run psig every 4 hours (on the hour) then it should look like this:
0 0-23/4 * * * /dir/psig
OR:
0 0,4,8,12,16,20 * * * /dir/psig

What you have says run every minute during the 4 AM hour.

Format is:
[MIN] [HOUR] [DAY OF MONTH] [DAY OF MONTH] [DAY OF WEEK] COMMAND


Looks like you tcl is running 10 minutes after every hour of every day. Should be:
0-59/6 * * * * /dir/something.tcl
OR:
0,10,20,30,40,50 * * * * /dir/something.tcl

You get your crontab file by running crontab -e
That will open vi and you enter your commands, one per line. So in your case:

#Always a good idea to comment for future troubleshooting
0 0-23/4 * * * /dir/psig
#More comments...
0-59/6 * * * * /dir/something.tcl

Hope that helps!
 
Old 12-31-2003, 10:10 AM   #7
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
Your first crontab seems correct.
To track down any errors remove >/dev/null 2>&1
This way you will have errors sent by mail to the user for which this crontab belong.
Check the mail and you should be a piece on the way.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Intel sound not working, usb modem not working. siriusb Linux - Hardware 8 03-04-2006 11:16 PM
F1 - F10 not working when F13 - F20 working in Linux haivinay Linux - General 0 09-20-2004 08:31 AM
F3-F10 is not working when F13-F20 is working in redht-8. haivinay Linux - General 0 09-20-2004 07:39 AM
Link/Applet not working in all Linux browsers, but working in IE MasterPatricko Linux - Software 6 09-04-2004 04:39 AM
cannot download files in mozilla -save dialog not working, galeon not working cmisip Linux - General 0 08-03-2003 04:25 PM


All times are GMT -5. The time now is 01:11 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration