|
Subject
|
Crontab help
|
| | Posted by | gbcue (DH New User
) | | Posted on | 10/14/06 07:43 PM |
|
|
I have a cron job setup but it's not working :\.
It's set to:
*/5 * * * * /usr/execute/something /home/directory/somescript.cron --extra_config=config.xml
It says (when I just type out the cronjob command):
Reading configuration file: config.xml [ERROR] Cannot read configuration file: config.xml Configuration file errors -- exiting.
But I know it's working because when I just type out
python somescript.cron --extra_config=config.xml
it works fine.
What should I do?
Thanks!
If this is working, I want to set it to execute every 24 hours...
|
|
|
|
Subject
|
Re: Crontab help
[re: gbcue]
|
| | Posted by | sdayman (DH Grizzled Veteran) | | Posted on | 10/14/06 08:43 PM |
|
|
How about using the full path for config.xml?
And to get a cron to execute once every 24 hours, say at 2:30 in the morning, you'll need (but already know): 30 2 * * * /yourcommand
If you want to keep testing this thing using cron, you can do: at now + 1 minute at> usr/execute/something /home/directory/somescript.cron --extra_config=/fullpath/config.xml at> ^d
There might be a more graceful way to input 'at' commands, but I'm lazy and do it the above way.
-Scott
|
|
|
|
Subject
|
Re: Crontab help
[re: sdayman]
|
| | Posted by | gbcue (DH New User
) | | Posted on | 10/14/06 09:12 PM |
|
|
It's not executing anything! The script file that is supposed to be updated isn't being updated. Argg, this is so complicated!
the at> thing doesn't work either...
|
|
|
|
Subject
|
Re: Crontab help
[re: gbcue]
|
| | Posted by | sdayman (DH Grizzled Veteran) | | Posted on | 10/15/06 07:35 AM |
|
|
Without knowing exactly what you're running in cron, it's just hard to guess what the problem is. What's the /usr/execute/something? And what does somescript.cron do?
-Scott
|
|
|
|
Subject
|
Re: Crontab help
[re: sdayman]
|
| | Posted by | gbcue (DH New User
) | | Posted on | 10/15/06 10:43 AM |
|
|
I'm trying to python a sitemap script from Google.
|
|
|
|
Subject
|
Re: Crontab help
[re: gbcue]
|
| | Posted by | sdayman (DH Grizzled Veteran) | | Posted on | 10/15/06 04:43 PM |
|
|
I downloaded the sitemap script and got it to work. It looks like --extra_config is not a valid flag. Here's what worked for me: garth:~/scottdayman.com/sitemap> at now + 1 minute warning: commands will be executed using /bin/sh at> /usr/bin/python ~/scottdayman.com/sitemap/sitemap_gen.py --config=config.xml at> <EOT> job 51316 at 2006-10-15 16:40
And it emailed me normal results.
-Scott
|
|
|
|
Subject
|
Re: Crontab help
[re: sdayman]
|
| | Posted by | gbcue (DH New User
) | | Posted on | 10/15/06 04:47 PM |
|
|
What email did it send it?
|
|
|
|
Subject
|
Re: Crontab help
[re: gbcue]
|
| | Posted by | sdayman (DH Grizzled Veteran) | | Posted on | 10/15/06 04:52 PM |
|
|
The email was the output of the cronjob, which is exactly what it spews when run manually from the command line:
Reading configuration file: config.xml Opened URLLIST file: urllist.txt Walking DIRECTORY "/home/sdayman/scottdayman.com/blah/" Walking DIRECTORY "/home/sdayman/scottdayman.com/" Opened ACCESSLOG file: /home/sdayman/logs/scottdayman.com/http/access.log Opened ACCESSLOG file: /home/sdayman/logs/scottdayman.com/http/access.log.0 Sorting and normalizing collected URLs. Writing Sitemap file "/home/sdayman/scottdayman.com/sitemap.xml.gz" with 2864 URLs Notifying search engines. Notifying: www.google.com Count of file extensions on URLs: 11 (no extension) 2 .afm 2 .conf 45 .css 1 .db 1 .dis 1 .fcgi 359 .gif 26 .htm 305 .html 3 .ico 1 .inc 38 .jpg 128 .js 3 .pdf 519 .php 1 .php-dist 9 .pl 29 .pm 867 .png 3 .py 102 .txt 1 .wbm 93 .xml 1 .xsd 1 .xslt 1 .zip 311 / Number of errors: 0 Number of warnings: 0
But the main point is that you used the flag --extra_config=config.xml when it's supposed to just be --config=config.xml
-Scott
|
|
|
|
Subject
|
Re: Crontab help
[re: sdayman]
|
| | Posted by | gbcue (DH New User
) | | Posted on | 10/15/06 04:55 PM |
|
|
I got it fixed, but it won't email me anything. What email address did it send that info to you?
|
|
|