In this tutorial, we’ll walk you through the process of how to setup a cron job using the cPanel dashboard, available to users on one of Domains.co.za’s Web Hosting plans.
Automating routine tasks with cron jobs is an effective way to optimise server maintenance and ensure seamless application deployment. Cron jobs allow you to schedule commands or scripts to run automatically at specified intervals, such as daily, weekly, or monthly.
For instance, you could set up a weekly cron job to automatically delete temporary files, which can enhance system performance and conserve disk space. This automation not only improves operational efficiency but also frees up time and resources for other critical tasks.
IMPORTANT:
You need to have a good knowledge of Linux commands before you can use cron jobs effectively. Check your script with your hosting administrator before adding a cron job.
TABLE OF CONTENTS
How to Setup a Cron Job in cPanel
This tutorial assumes that you have access to cPanel and are already logged in.
1. Click the Cron Jobs icon under the Advanced section of the cPanel dashboard.

2. Enter the Email Address where you want the cron job results sent after each time it runs.

3. Now you must define exactly when, and how often, you want the cron job to run by setting the criteria. This is made easier by using one of the pre-defined or Common Settings.
Notice that by choosing a common setting, all fields are filled in automatically. This also helps you understand what each field means.

4. For this tutorial, let’s choose Once Per Week.
5. Next, enter the Command of the script you want to run, including the path (from root).
6. When ready, click Add New Cron Job

That’s it! The cron job has been set.
You can create additional cron jobs and edit or delete existing ones under the Actions menu under the Current Cron Jobs list.
This is the end of the tutorial. You now know how to set up cron jobs in cPanel!
Additional Information
Advantages of Using Cron Jobs
Setting up cron jobs can be incredibly useful for automating various tasks that need to be executed on your server at regular intervals. Here are some common scenarios where cron jobs prove beneficial:
- Scheduled Backups: Cron jobs can be configured to automatically back up your website files and databases regularly. This ensures you have up-to-date backups available in case of data loss or server issues.
- Automated Maintenance Tasks: These jobs are perfect for routine maintenance tasks like updating software packages, optimising databases, and clearing cache files, helping to keep your server running smoothly.
- Email Reports: If you need to generate and send reports via email regularly, a cron job can be set up to run a script that automates this process, saving you time and ensuring consistency.
- Data Synchronisation: Cron jobs can periodically synchronise data between multiple databases or systems, ensuring that your data remains consistent and up to date across platforms.
- Content Updates: For websites or applications that require frequent content updates, cron jobs can fetch new content from external sources and update your site or database accordingly.
- Monitoring and Alerts: You can use cron jobs to run scripts that monitor server performance metrics or check for specific conditions. These scripts can then trigger alerts or notifications if certain thresholds are exceeded.
- Automated Testing: In software development, cron jobs can be scheduled to run automated tests at set intervals, helping to ensure the reliability and performance of your applications.
Login to Domains.co.za Account
1. Go to the Domains.co.za Login website page.

2. Enter your Email and Password and click the “Sign In” button.
3. You will see the Domains.co.za Dashboard, displaying the Manage Account menu on the left and your Account Information, Account Overview and Open Support Tickets on the right.

Login to cPanel from your Domains.co.za Dashboard
4. Click on Manage Services to view the sub-dropdown menu and select the hosting package for the domain you want to work with – in our example we are using Web Hosting.

5. Click the Manage button to the right of the domain name you want to access.
6. The display will now show Product Information, Quick Manage, Resource Usage and Site Statistics for that domain name.

7. Under Product Information, scroll down to Control Panel, which will display cPanel to the right, and click on the Login button.

8. The cPanel Dashboard will now be displayed.