We value your feedback!
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
You can use cPanel's Cron Job feature to run Unix commands and also automate the execution of your PHP, Perl, or Python Scripts. To create a Cron Job, first log into your cPanel and select "Cron jobs:"
Cron jobs use the following time field sequence:
[minute] [hour] [day] [month] [weekday] [command]
48 09 * * * /my/script -v
This will run every morning at 9:48 AM. The * is a wild card, meaning "every day/month, etc" For example; 48 09 * * * = every 48 minutes of every 9th hour of every day of of the month. Just to clarify, the setting for "Weekday" should be interpreted as day of the week, including Saturday and Sunday. Many people think of weekday as just Monday through Friday, but when referring to cron job settings, it actually means every day of the week.
It is suggested that Cron Jobs not be scheduled at the top or bottom of the hour. Remember that you are not the only user on the server who may be using a cron job. If all the cron jobs were scheduled at the same time, the server performance would be slowed when it tries to execute all of the scripts. So, for example, the best times to set a cron job to run may be at an odd minute such as the example above. It is set to run at 9:48 every morning. Help keep server performance at an optimum level by setting the cron job execution at an odd time.
The command should have two parts:
[program to run (perl/pyth./php)] [switches] [script]
The program to run will specify the type of script you are executing, and will either be:
The script will need to be connected directly to its location on our server, so it will be something similar to: /home/username/public_html/path/to/script, with "username" being your username.
Most scripts that are run through wget can be ran through lynx or curl commands, which are allowed in Cron Jobs. Be sure to set the user agent in any lynx or curl commands you run. If the user agent isn't set, mod_security rules on the server will prevent the commands from running. For example:
curl -A -s useragent (URL)
curl -A "Mozilla 4.0" http://mydomain.com/myscript.php
lynx -dump -useragent (URL)
We value your feedback!
|Email:||support@WebHostingHub.com||Ticket:||Submit a Support Ticket|
|Chat:||Click To Chat Now|