Closed Thread
Results 1 to 4 of 4

Thread: Cron help

  1. #1
    tattekudasai is offline x10Hosting Member tattekudasai is an unknown quantity at this point
    Join Date
    Sep 2008
    Posts
    8

    Cron help

    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 by tattekudasai; 08-28-2011 at 03:04 PM.

  2. #2
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,635

    Re: Cron help

    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 by descalzo; 08-28-2011 at 03:17 PM.
    Nothing is always absolutely so.

  3. #3
    tattekudasai is offline x10Hosting Member tattekudasai is an unknown quantity at this point
    Join Date
    Sep 2008
    Posts
    8

    Re: Cron help

    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 by tattekudasai; 08-29-2011 at 01:16 PM.

  4. #4
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,635

    Re: Cron help

    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.
    Nothing is always absolutely so.

Closed Thread

Similar Threads

  1. Cron Job Help
    By chewett in forum Free Hosting
    Replies: 4
    Last Post: 08-02-2010, 03:56 AM
  2. Replies: 6
    Last Post: 11-14-2009, 06:38 PM
  3. Can a cron job kick off another cron job?
    By dmoneyman in forum Programming Help
    Replies: 8
    Last Post: 04-03-2009, 08:04 PM
  4. [cron problem]php-cron command not found
    By N4rk0 in forum Free Hosting
    Replies: 1
    Last Post: 01-31-2008, 11:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers