Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Creating a Cron Job on godaddy

Posted on 2010-08-31
2
Medium Priority
?
372 Views
Last Modified: 2012-05-10
Hi,
I want a script 'myscript.php' which is located in the root of my website to run once every 5 minutes. How would I go about creating Cron  job in order to achieve this?
0
Comment
Question by:jdav357
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 20

Accepted Solution

by:
woolnoir earned 2000 total points
ID: 33565706
http://help.godaddy.com/article/3548 <-- this page has a usefull guide how to do it


Log in to your Account Manager.
From the Products section, click Web Hosting.
Next to the hosting account you want to use, click Launch.
In the Content section of the Hosting Control Center, click the Cron Manager icon. This action displays the Cron Manager screen.
Click edit next to the Email Address heading in the left navigation area.
Enter the email address to which you would like to have all information sent regarding this Cron Job.
Click Save.
Click Create Cron Job.
Click Custom.
Enter the required information in each field to schedule the task to run repeatedly at specific intervals.
Cron Job Title
Enter a name for this Cron Job. Ideally, this title relates to this task, so you can identify it easily.
Command
The Command field is the script or executable that runs at a specified frequency. Click Browse to locate a file in your hosting account. The full file name of your selection is placed into this editable field. Click the question mark icon for additional assistance in selecting a command.

NOTE: Our sample scripts use the variable $HOME. We recommend using $HOME to represent the actual server path, although either can be used.
Minutes
Enter the time that you want the Cron Job to run. For example, you can set your job to run at 15 minutes after each hour by selecting "x:15." You can run tasks twice per hour by selecting the Run twice an hour setting. This setting automatically sets tasks to run 30 minutes apart.
Hours
Enter the time of day that you want the Cron Job to run. For example, you can set your job to run each day at 1:00 p.m. by selecting "13:xx."
Day of the Month
Enter the day of the month that you want the Cron Job to run. For example, you can set your job to run on the 15th of each month by selecting "15."
Month
Enter the month that you want the Cron Job to run. For example, you can set your job to run each February by selecting "February."
Day of the Week
Enter the day of the week that you want the Cron Job to run. For example, you can set your job to run each Thursday by selecting "Thursday."
Click Save.
Your Cron Job is saved, enabled, and runs at the next scheduled interval.
0
 
LVL 2

Author Comment

by:jdav357
ID: 33584060
Hi,
i have been entering the following command:
/web/cgi-bin/php5 "$HOME/html/myfolder/index.php?/home/cron/"

Where myfolder is the subdirectory the file I want to run in is located. I also need to pass in the query string- unfortunately it keeps saying inputfile not found.
Any suggestions?
0

Featured Post

Supports up to 4K resolution!

The VS192 2-Port 4K DisplayPort Splitter is perfect for anyone who needs to send one source of DisplayPort high definition video to two or four DisplayPort displays. The VS192 can split and also expand DisplayPort audio/video signal on two or four DisplayPort monitors.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this. Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it i…
This article discusses four methods for overlaying images in a container on a web page
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question