In This Document
If you wish to deploy the contents of a cPanel-managed repository on a schedule, you can set up deployment cron jobs. Cron jobs allow you to configure the system to run a specified command automatically at a specified interval.
For more information about deployment, read our Guide to Git - Deployment documentation.
Set up deployment cron jobs
Locate the repository's directory.
In order to configure your deployment cron job, you must use the correct repository path.
To locate the desired repository's directory, navigate to cPanel's Git Version Control interface (cPanel >> Home >> Files >> Git Version Control). Then, in the list of repositories, locate the Repository Path value for the desired repository.
Use the Cron Jobs interface to configure your cron job.
The Cron Jobs interface (cPanel >> Home >> Advanced >> Cron Jobs) allows you to configure cron jobs.
To configure your deployment cron job, perform the following steps:
- Select the interval at which you wish to run the cron job. You can select a commonly-used interval from the Common Settings menu, or select or enter a specific interval for the following values:
Minute — The number of minutes between each time that the cron job runs or the minute of each hour on which you wish to run the cron job.
- Hour — The number of hours between each time that the cron job runs or the hour of each day on which you wish to run the cron job.
- Day — The number of days between each time that the cron job runs or the day of the month on which you wish to run the cron job.
- Month — The number of months between each time that the cron job runs or the month in which you wish to run the cron job.
Weekday — The days of the week on which you wish to run the cron job.
In the Command text box, enter the commands that you wish the system to run, for example:
- In this example,
/home/user/examplerepresents the repository's Repository Path value.
If your server runs CloudLinux™, begin these commands with the
/usr/local/cpanel/bin/filepath, for example:
This command calls UAPI's
VersionControlDeployment::createfunction, which creates a new deployment task. This task will run the deployment commands that you specified in your
- In this example,
- Click Add New Cron Job.
There is no content with the specified labels