Cron jobs are tasks that run on their own at set times or intervals. Most of the time, they are run using a script file, and they can do a lot of things, like running scripts, sending emails, or doing maintenance work.
⚠️ Be careful: Running cron jobs too often can affect your LVE limits and may break fair usage rules.
The Cron Email feature lets you get emails every time your cron jobs run.
To set up email alerts:
Type in the email address where you want to get notifications in the Email text box.
To save the changes, click Update Email.
To stop getting email alerts for cron jobs:
All cron jobs: Take out the email address from the Cron Email field.
Specific cron job:
Find the cron job you want to change.
Change the cron job configuration line by adding the string below:
> /dev/null 2>&1Make sure to save your changes.
To set up a new cron job:
Set the cron job's interval by picking options from the menus or typing in the values you want.
Common Settings: Automatically fills in the Minute, Hour, Day, Month, and Weekday fields with pre-set intervals. This is helpful if wildcards (*) and manual intervals are hard to understand.
Set up the fields:
Minute: The number of minutes between runs or the exact minute of each hour.
Hour: The number of hours between runs or a certain hour of the day.
Day: The number of days between runs or a certain day of the month.
Month: The number of months between runs or a certain month of the year.
Weekday: The days of the week when the cron job should run.
Type the command you want the system to run in the Command text box.
Always give the full path to the file.
Example to run index.php in your public_html folder:
/home/username/public_html/index.php⚠️ Important: Fill in all the required fields: Command, Minute, Hour, Day, Month, Weekday, and Command.
⚠️ Warning: When you use the
rmcommand in a cron job, be very careful. If you choose the wrong options, you could lose important files in your home directory.
To save it, click Add New Cron Job.
The Current Cron Jobs table shows you all of your current cron jobs, along with their commands and schedules.
To change a cron job that is already there:
Find the cron job and click on it to change it.
Make any necessary changes to the settings.
To save your changes, click Edit Line.
To get rid of a cron job:
Click the Delete button next to the cron job you want to remove.
To confirm the deletion, click Delete.
Our Cyberin team is here to help you with cPanel and other hosting features if you need it.