The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Setting up a Cron Job

Discussion in 'General Discussion' started by carella, May 18, 2004.

  1. carella

    carella Member

    Joined:
    May 15, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    England
    Hello,

    This is my first post here, so I hope you guys can help. Forgive me if this has been posted before.

    I have just signed up for a web hosting package and my new server uses cpanel. My previous hosting companies all used Ensim and set up the cron jobs for me, so I`m a little new to this.

    I need a php file to execute every day. Its an ecard program that has an advanced date send feature. Lets say the file is as follows:

    http://mysite.com/ecards/advancedate.php

    Now I have used the 'Standard' cron job option and entered the command line as follows:

    home/username/public_html/ecards/advancedate.php

    This unfortunately gives me a 'File Not Found' error in the e-mail. I know the file exists because I have been executing it manually.

    Is there something else I need to add to the command line?

    Thank you,

    carella.
     
  2. ErkDog

    ErkDog Member

    Joined:
    Jan 26, 2004
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    you need to set the crontab up as

    wget 'http://domain.com/folder/file.php'
     
  3. GOT

    GOT Get Proactive!

    Joined:
    Apr 8, 2003
    Messages:
    900
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Norfolk, VA
    cPanel Access Level:
    DataCenter Provider
    You can also use:

    php /home/username/public_html/ecards/advancedate.php
     
  4. carella

    carella Member

    Joined:
    May 15, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    England
    Thank you very much for the help, I will try both of your suggestions. :)
     
  5. carella

    carella Member

    Joined:
    May 15, 2004
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    England
    As a follow up I just wanted to say thank you, I now have my cron job working like a charm.

    Many thanks.
     
  6. pdurvasula

    pdurvasula Registered

    Joined:
    Nov 28, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hi

    I am struggling to set up a cron job since a long time. After seeing these posts and help renderd, I got confidence that I can get support from here.

    I am having a greeting card program and I want to introduce a feature by which my visitors can set a future date at which the their greeting card can be sent.

    I am having Bluehost as my web host.
    In blue host, setting time periodicity to execute the Cron job and email address to which the information about cronjob is to be sent is done by filling the form given.
    As an example for command line it is given as:

    php -q public_html/example.php

    From this I understand that a php file is to be created and uploaded to the server. I would like to know what shall be the text to be written in the php file and where is it to be placed on the server.

    The documentation of the greeting card program says:

    "If you have pending cards to be sent at a later date, you can schedule a cronjob that will check and send any cards due to be sent.

    The cronjob needs to call:

    /full/path/to/cgi-bin/pd/pd.cgi sendcards=yes "

    I am a novice to this and request guidance from my learned friends in the matter

    Thanks

    - Padmanabham
     
Loading...

Share This Page