hide   Never miss a deal of the day with our Daily Deals Section!
Stretch interface sizeReset interface & text size
Go Back   RedFlagDeals.com Forums > Computers & Electronics
Sponsored by:

Reply  
 
Thread Tools
Old Oct 23rd, 2007, 12:12 PM   #1 (permalink)
Deal Addict
 
Join Date: Jan 25th, 2005
Posts: 1,620
Send a message via MSN to lil_c09 Send a message via Yahoo to lil_c09
Default 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.
lil_c09 is offline  
Send a private message to lil_c09 Reply With Quote
Sponsored Links - Join the RedFlagDeals.com community and remove this ad.
Old Oct 23rd, 2007, 12:57 PM   #2 (permalink)
Member
 
Join Date: Dec 24th, 2002
Posts: 321
Default

Remove the "/1" in the first column.

Last edited by kc33; Oct 23rd, 2007 at 01:01 PM..
kc33 is offline  
Send a private message to kc33 Reply With Quote
Old Oct 23rd, 2007, 03:18 PM   #3 (permalink)
Deal Addict
 
Join Date: Jan 25th, 2005
Posts: 1,620
Send a message via MSN to lil_c09 Send a message via Yahoo to lil_c09
Default

Quote:
Originally Posted by kc33 View Post
Remove the "/1" in the first column.
No, that didn't work.
lil_c09 is offline  
Send a private message to lil_c09 Reply With Quote
Old Oct 23rd, 2007, 03:54 PM   #4 (permalink)
Deal Addict
 
h2o-'s Avatar
 
Join Date: Mar 25th, 2004
Location: STC
Posts: 1,881
Default

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
__________________
h2o- a.k.a. 阿水 (Ah Sui)

Feedback: HoFo | eBay | Heatware
Items 4 sale: Comp. | Cell. | Misc. | Auto
h2o- is online now  
Send a private message to h2o- Reply With Quote
Old Oct 23rd, 2007, 03:56 PM   #5 (permalink)
Member
 
Join Date: Dec 24th, 2002
Posts: 321
Default

Quote:
Originally Posted by lil_c09 View Post
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?
kc33 is offline  
Send a private message to kc33 Reply With Quote
Old Oct 23rd, 2007, 04:33 PM   #6 (permalink)
Deal Addict
 
Join Date: Jan 25th, 2005
Posts: 1,620
Send a message via MSN to lil_c09 Send a message via Yahoo to lil_c09
Default

Quote:
Originally Posted by kc33 View Post
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
lil_c09 is offline  
Send a private message to lil_c09 Reply With Quote
Old Oct 23rd, 2007, 05:04 PM   #7 (permalink)
Deal Addict
 
zoomzoom's Avatar
 
Join Date: Nov 27th, 2003
Posts: 1,323
Default

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
zoomzoom is offline  
Send a private message to zoomzoom Reply With Quote
Old Oct 24th, 2007, 09:23 AM   #8 (permalink)
Member
 
Join Date: Dec 24th, 2002
Posts: 321
Default

Quote:
Originally Posted by lil_c09 View Post
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'.
kc33 is offline  
Send a private message to kc33 Reply With Quote
Old Oct 24th, 2007, 11:57 AM   #9 (permalink)
Deal Addict
 
Join Date: Jul 30th, 2002
Location: Alberta
Posts: 2,350
Default

Change it to

PHP Code:
*/* * * * 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 11:59 AM..
siriuskao is offline  
Send a private message to siriuskao Reply With Quote
Old Oct 24th, 2007, 01:35 PM   #10 (permalink)
Deal Addict
 
Join Date: Jan 25th, 2005
Posts: 1,620
Send a message via MSN to lil_c09 Send a message via Yahoo to lil_c09
Default

Quote:
Originally Posted by kc33 View Post
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.
lil_c09 is offline  
Send a private message to lil_c09 Reply With Quote
Old Oct 24th, 2007, 01:48 PM   #11 (permalink)
Deal Addict
 
Join Date: Jan 25th, 2005
Posts: 1,620
Send a message via MSN to lil_c09 Send a message via Yahoo to lil_c09
Default

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.
lil_c09 is offline  
Send a private message to lil_c09 Reply With Quote
Old Oct 24th, 2007, 04:00 PM   #12 (permalink)
Member
 
Join Date: Dec 24th, 2002
Posts: 321
Default

Quote:
Originally Posted by lil_c09 View Post
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.
kc33 is offline  
Send a private message to kc33 Reply With Quote
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump


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






Copyright © 2000 - RedFlagDeals.com, a division of Clear Sky Media, Inc. All rights reserved. (Terms of Use, Privacy Policy)
Close this bar

Welcome to RedFlagDeals.com - Canada's Largest Bargain Hunting Community!

If this is your first visit, the most popular forums are:

  • Hot Deals - Deals from retailers all across Canada
  • Freebies - Free samples that you can sign up for online
  • Contests - Contests from around the Internet
Sign up now!

Why join RedFlagDeals.com?

Join a community of over 200,000 bargain hunters from all across Canada. As a member you can post comments, ask questions, and share deals, coupons, and freebies! Best of all, signing up is free!