How to Create Cron Job in DirectAdmin

The cron command-line utility is a job scheduler on Unix-like operating systems. Users who set up and maintain software environments use cron to schedule jobs, also known as cron jobs, to run periodically at fixed times, dates, or intervals.

Login to DirectAdmin

Log in to your DirectAdmin control panel using your username and password.

images

Navigate to Cron Jobs

Look for the "Advanced Features" section, and click on "Cron jobs",

images

Add a New Cron Job

Click on the "Create a new cron job" or "Add a cron job" button.

images

Specify Cron Job Details

Enter the command you want to run. If you're running a PHP script, the command might look like this,

php /path/to/your/script.php

Replace /path/to/your/script.php with the current path to your PHP script.

Specify the schedule for the cron job. For running a job every day at a specific time, you might use something like,

0 1 * * *

This means the cron job will run every day at 1:00 AM. The asterisks in the "Day of month," "Month," and "Day of week" fields mean "every day of the month," "every month," and "every day of the week," respectively. So, this cron job is scheduled to run daily at 1:00 AM.

also, Click Here to check/create timings as per your requirements.

* * * * *
| | | | |
| | | | +-- Day of the week (0 - 7) (Sunday is both 0 and 7)
| | | +---- Month (1 - 12)
| | +------ Day of the month (1 - 31)
| +-------- Hour (0 - 23)
+---------- Minute (0 - 59)

Once created you can check the created cron jobs, images

E-mail

You may want to enter your email address to receive notifications about the cron job. This can be helpful for debugging.

Click on the "Add" or "Save" button to create the cron job.

Make sure to replace placeholder values ​​with your current details.


CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME for 10% off!

1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month

Available Locations: LAX | MIA | ATL | FRA | AMS