Cron help

Status
Not open for further replies.

tattekudasai

New Member
Messages
8
Reaction score
0
Points
0
So is the cron job limitation on average one per five minutes or a hard limit of one job running for every five minute time slot? That is, can I have six jobs run once a day at the same time and still be within the limit?

I'm trying to have a daily wget to a php script for processing, though it does require GET data. I have tried the same command on my own shell, which works fine, but it doesn't work as a cron job. Need I specify the direct path to wget? And what is the default directory you're in when a cron job runs? home? I haven't been getting any emails when my cron jobs run either.
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
No two cron jobs can be scheduled within 5 minutes of each other.

ie jobA going off at 1:00 am every day and jobB going off at 1:00 am every day is not allowed. they would have to be scheduled at 1:00 am and 1:05 am.

wget uses the Web, so the path would be something like http://mysite.x10.bz/mycronscript.php?foo=apple&bar=cherry

cron jobs run with working directory /home/igor where igor is your cPanel username

the cPanel email notification has been disabled. If left on, it would swamp the email server.
 
Last edited:

tattekudasai

New Member
Messages
8
Reaction score
0
Points
0
So I have set up my cron jobs as you've said and spaced them out correctly, but it seems like they still do not execute.

wget 'http://site.exofire.net/path/to/script.php?foo=bar'

A command like that works fine when I execute on my own linux box, though.

Also curious, which shell does cron run under, bash?
 
Last edited:

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
Code:
wget -O -  "http://mysite.x10.bz/path/crontest_test.php?foo=ray&bar=dante" >>/home/igor/public_html/path/cron_test_log.txt 2>&1

That is a capital 'o', not a zero

It appends any output / error messages to the log file (replace igor with your cPanel username). You can then add temporary "echo" statements to debug.
 
Status
Not open for further replies.
Top