is it possible to run cron jobs directly from php file without hosting control panel?

Discussion in 'PHP' started by ramysarwat, Oct 29, 2009.

  1. #1
    is it possible to run cron jobs directly from php file without hosting control panel ?
     
    ramysarwat, Oct 29, 2009 IP
  2. CodedCaffeine

    CodedCaffeine Peon

    Messages:
    130
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    This will probably work fine:

    $cmd = 'the-cron-command';
    if(! system($cmd))
    echo 'An error has occurred with the cron job.';
    PHP:
     
    CodedCaffeine, Oct 29, 2009 IP
  3. organicCyborg

    organicCyborg Peon

    Messages:
    330
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #3
    If you've got SSH access, you can set up a cron job through the command line. Is that what you mean?
     
    organicCyborg, Oct 29, 2009 IP
  4. thuankkk

    thuankkk Active Member

    Messages:
    503
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    95
    #4
    You can use www.setcronjob.com to call PHP script's URL. It's simple, fast, and easy to set up your cron.
     
    thuankkk, Nov 4, 2009 IP