Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 6 of 6
  1. #1
    Member
    Join Date
    May 2004
    Location
    England
    Posts
    5

    Default Setting up a Cron Job

    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. #2
    Member
    Join Date
    Jan 2004
    Posts
    11

    Default

    you need to set the crontab up as

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

  3. #3
    GOT
    GOT is offline
    Get Proactive! GOT's Avatar
    Join Date
    Apr 2003
    Posts
    902

    Default

    You can also use:

    php /home/username/public_html/ecards/advancedate.php
    Proactive Server Monitoring and Management
    http://got-management.com

  4. #4
    Member
    Join Date
    May 2004
    Location
    England
    Posts
    5

    Default

    Thank you very much for the help, I will try both of your suggestions.

  5. #5
    Member
    Join Date
    May 2004
    Location
    England
    Posts
    5

    Default

    As a follow up I just wanted to say thank you, I now have my cron job working like a charm.

    Many thanks.

  6. #6
    Registered User
    Join Date
    Nov 2010
    Posts
    1

    Default Re: Setting up a Cron Job

    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

Similar Threads & Tags
Similar threads

  1. Help Setting up a Cron Job
    By wczone in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-25-2007, 12:58 AM
  2. Help Setting a cPanel Cron Job
    By wczone in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-17-2007, 03:48 PM
  3. cron job help
    By mher in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-11-2006, 01:33 AM
  4. need help with setting up a cron job
    By positive in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-27-2004, 05:19 PM
  5. need help with setting up a cron job
    By positive in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-27-2004, 02:11 PM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube