Cron Jobs

CloudPanel v1 is obsolete

CloudPanel v1 is obsolete; check out the CloudPanel v2 Docs.

Cron is one of the most useful utility that you can find in any Unix-like operating system.
It is used to schedule commands at a specific time. These scheduled commands or tasks are known as Cron Jobs.

Adding a Cron Job

Via CloudPanel

To add a Cron Job click on the button Add Cron Job top right.



Select a Template that prefills the fields Minute, Hour, Day, Month, and Weekday.

Enter the Command and select the user as which the cron job will be executed.

Permissions

Running the Cron Job as the right user is very important. Running as the right user will prevent permission issues e.g., if your script is reading and writing files.

Via Command Line

The standard linux way to configure Cron Jobs on the command line can be used as well.

1) Login via SSH with the user who should run the Cron Job e.g. john-ssh.

2) Enter the following command to edit Cron Jobs:

crontab -e

3) Enter your Cron Job.

On the following site, you find some useful examples of how to configure them.

Deleting a Cron Job

On the Cron Jobs overview site, you can delete a Cron Job by clicking on the button Delete.

Settings

In the Settings, you can enter an email address to receive the output every time the cron job runs.