Thread: Can you tell what's wrong with my cron job?
-
Oct 23rd, 2007 11:12 AM
#1
Can you tell what's wrong with my cron job?
Hi there, I've been stressing on such a small issue for the past couple hours, and I fail to see what i've done wrong.
Code:
*/1 * * * * /home/chris/.xchat2/xchatlogs/cron.pisg --silent
It's suppose to run the cron job every one minute. cron.pisg is an application that runs in terminal, but for the stupidest reason I can't get it to run.
I load the cronjob, by going to the folder where the cron job is, and type crontab crontab1 as that's the file name of the cron job. when I type crontab -l to make sure it's running, it also is there.
any help would b greately appreciated.
-
-
Oct 23rd, 2007 11:57 AM
#2
Remove the "/1" in the first column.
Last edited by kc33; Oct 23rd, 2007 at 12:01 PM.
-
Oct 23rd, 2007 02:18 PM
#3

Originally Posted by
kc33
Remove the "/1" in the first column.
No, that didn't work.
-
Oct 23rd, 2007 02:54 PM
#4
I would do that to see if that runs @ 5pm, then troubleshoot for something else.
Code:
00 17 * * * /home/chris/.xchat2/xchatlogs/cron.pisg --silent
-
Oct 23rd, 2007 02:56 PM
#5

Originally Posted by
lil_c09
No, that didn't work.
Are you getting error? Can you find anything specific in the cron log that points to a problem? Was the application launched at all? Are you able to run the exact command manually? Would cron launch the application if you scheduled it to run at a specific time?
-
Oct 23rd, 2007 03:33 PM
#6

Originally Posted by
kc33
Are you getting error? Can you find anything specific in the cron log that points to a problem? Was the application launched at all? Are you able to run the exact command manually? Would cron launch the application if you scheduled it to run at a specific time?
No errors when attempting to run it, can't seem to find the cron log? the application wasn't launched at all, I'm able to launch the application on it's on. and like h2o suggested, it didn't work.
[QUOTE=h2o-;5813506]I would do that to see if that runs @ 5pm, then troubleshoot for something else.
Tried that, fast fowarded the time to 5, and it didn't work
-
Oct 23rd, 2007 04:04 PM
#7
You need to get rid of the --silent (if that is a comment line, use the # symbol).
If you want it to goto a log file, you need to pipe it out:
00 17 * * * /home/chris/.xchat2/xchatlogs/cron.pisg > /home/chris/.xchat2/xchatlogs/cron.pisg.mylogfile 2>&1
-
Oct 24th, 2007 08:23 AM
#8

Originally Posted by
lil_c09
No errors when attempting to run it, can't seem to find the cron log? the application wasn't launched at all, I'm able to launch the application on it's on. and like h2o suggested, it didn't work.
Have you checked if cron daemon is running at all?
If it is, try to schedule run of a simple command such as 'date > /home/chris/date.txt'.
-
Oct 24th, 2007 10:57 AM
#9
Change it to
PHP Code:
*/1 * * * * root /home/chris/.xchat2/xchatlogs/cron.pisg --silent
Specify a user if you are editing /etc/crontab directly. Leave the username off if you are editing user's crontab via crontab -e
oh, I am assuming you've already checked obvious things like cron daemon is running and command is correct. If it is incorrect, you should get error output.
Last edited by siriuskao; Oct 24th, 2007 at 10:59 AM.
-
Oct 24th, 2007 12:35 PM
#10

Originally Posted by
kc33
Have you checked if cron daemon is running at all?
If it is, try to schedule run of a simple command such as 'date > /home/chris/date.txt'.
Yessir, it worked. I will try to see exactly what i did wrong.
-
Oct 24th, 2007 12:48 PM
#11
Urgh, nope. Still not working. An application that is run in terminal is allowed to be set up to run every minute, as a cron job correct? I mean, If I could get the txt to output the date as easily as I just did, then I fail to see why I can't get my cronjob to run the program.
-
Oct 24th, 2007 03:00 PM
#12

Originally Posted by
lil_c09
Urgh, nope. Still not working. An application that is run in terminal is allowed to be set up to run every minute, as a cron job correct? I mean, If I could get the txt to output the date as easily as I just did, then I fail to see why I can't get my cronjob to run the program.
Try to locate cron log file. The cron man pages should have the file location. Also, please clarify what "application that is run in terminal" meant. Is cron.pisg a shell script that launches other scripts? May be the problem is down stream.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules