Working with cron jobs in DirectAdmin

Cron jobs are tasks that will run at fixed time intervals. You can configure them via the DirectAdmin interface.

This KB article is intended for DirectAdmin shared hosting users.

To access the DirectAdmin cron jobs interface:

1. You need to log in to DirectAdmin

2. Navigate to Advanced Features >> Cron Jobs

3. Click the CREATE CRON JOB button. Choose now when the new cron job will run. Select minute, hour, day of month, month, day of week. Notice that the * sign means every minute, hour etc. 

Choose the cron job Command. This is usually a path to a file/script that will be executed.

Click the CREATE button to create the cron job.

directadmin cronjobs
DirectAdmin Cron Jobs Interface

Depending on the server configuration, you may need to change the file permission for the script you want to run via a cron job to 755.

Although DirectAdmin does not recommend this, cron jobs can also be configured for users by the server admin via SSH. Use the crontab -u username -e command to edit the cron jobs for username :

[root@web ~]# crontab -u plothost1 -e

Use the crontab -u username -l command to see the cron jobs for a specific user:

[root@web ~]# crontab -u plothost1 -l
#DO NOT EDIT THIS FILE. Change through DirectAdmin
* * * * * /home/plothost1/test.php
[root@web ~]#

Notice the DirectAdmin notification: DO NOT EDIT THIS FILE. Change through DirectAdmin.


Video tutorial for this article:

How to create Cron Jobs in DirectAdmin

Leave a Reply