+ Reply to Thread
Results 1 to 6 of 6

Thread: set a cron job to run any program

  1. #1
    sen01dj is offline x10Hosting Member sen01dj is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    40

    Post set a cron job to run any program

    i need to run cron.php file by coron job
    how can i do that
    pls help me
    thanks

    http://www.sensitivedjs.co.cc

  2. #2
    Anna's Avatar
    Anna is offline I am just me Anna is a name known to allAnna is a name known to all
    Join Date
    Aug 2007
    Location
    Sweden
    Posts
    6,569

    Re: set a cron job to run any program

    Place the cron.php in a suitable folder, it doesn't have to be the public_html folder.

    then in cPanel go to "cron jobs" chose the standard option.

    in the command to run line type: /usr/bin/php -q /home/yourcpaneluser/pathtofile/cron.php

    the yourcpaneluser folder represents your root folder.

    Set the timer as you need, but remember that on free servers you can not run it more often then every 5 minutes.
    Do you have trouble reaching your site?
    Check here first: News and Announcements


    Don't forget that x10hosting has an irc server as well. Come and join the fun
    server: irc.x10hosting.com, main channel: #x10hosting
    There's a lot helpful users there if need help building your site

  3. #3
    sen01dj is offline x10Hosting Member sen01dj is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    40

    Post Re: set a cron job to run any program

    Thanks for quick reply
    I am using coron.php for creating sitemap and submit to google

    I have another qustion

    I need to submit my site map to yahoo
    http://search.yahooapis.com/SiteExpl...itemap=http:// my site /sitemap.xml
    I dont have php file for that
    how can I add this to coron job

    and for ask
    http://submissions.ask.com/ping?sitemap=http:// my site /sitemap.xml
    how can I add these for coron job

    thank you.

    http://www.sensitivedjs.co.cc

  4. #4
    bpathak is offline x10Hosting Member bpathak is an unknown quantity at this point
    Join Date
    Jun 2009
    Posts
    6

    Re: set a cron job to run any program

    Quote Originally Posted by LadyAnna View Post
    Place the cron.php in a suitable folder, it doesn't have to be the public_html folder.

    then in cPanel go to "cron jobs" chose the standard option.

    in the command to run line type: /usr/bin/php -q /home/yourcpaneluser/pathtofile/cron.php

    the yourcpaneluser folder represents your root folder.

    Set the timer as you need, but remember that on free servers you can not run it more often then every 5 minutes.
    LladyAnna - Are you sure croj jobs are enabled for free hosting? I tried your suggestion and few other threads but the job does not seem to run. I should get an email with the output but that is not happening. Also I tried to write a file on the server through script to check if the cron jobs are running but nothing seems to happen. I think cron jobs are not enabled... Please advice.

  5. #5
    sen01dj is offline x10Hosting Member sen01dj is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    40

    Unhappy Re: set a cron job to run any program

    I hope my coron job is running
    earlier my code was wrong and I got error detail mail
    but now no job success or complete notification mail

    how can I add html web page to coronjob
    what is the command
    pls help me
    thank you

    http://www.sensitivedjs.co.cc
    Last edited by sen01dj; 06-21-2009 at 08:59 AM.

  6. #6
    sen01dj is offline x10Hosting Member sen01dj is an unknown quantity at this point
    Join Date
    May 2009
    Posts
    40

    Thumbs up Re: set a cron job to run any program

    My cronjob working now

    e:g :C planel user name :ruwan
    path to folder :public_html/sitemap
    file name :cron.php

    /usr/bin/php -q /home/ruwan/public_html/sitemap/cron.php


    http://www.sensitivedjs.co.cc

+ Reply to Thread

Similar Threads

  1. Cron job problem still...
    By woodyl in forum Free Hosting
    Replies: 1
    Last Post: 04-16-2009, 02:31 AM
  2. CRON Jobs and PHP
    By deadimp in forum Tutorials
    Replies: 14
    Last Post: 11-27-2008, 05:09 PM
  3. Cron Jobs
    By HackerzInc in forum Free Hosting
    Replies: 1
    Last Post: 10-01-2008, 10:06 PM
  4. Cron again again and again
    By Mika56 in forum Free Hosting
    Replies: 0
    Last Post: 08-18-2008, 12:03 PM
  5. Cron Tutorial (Crontab Tutorial)
    By sunils in forum Tutorials
    Replies: 3
    Last Post: 06-14-2008, 10:34 PM

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