DirectAdmin Cron setup is all possible like an expert now. Let’s see the steps our Support team provides to schedule Cron jobs in DirectAdmin
Bobcares, as part of our Server Management Service, responds to all inquiries, large or small.
Let’s take a closer look at Scheduling Cron jobs in DirectAdmin.
DirectAdmin Cron Scheduling
We can schedule a command or script on the server to run automatically at a given time and date using the Linux tool Cron. The scheduled task itself is called a Cron job. Cron jobs are a great tool for automating routine tasks.
Let’s see how we can schedule Cron job on DirectAdmin’s interface.
- First of all to access the panel, log in to DirectAdmin.
- Then click on Cron jobs under Advanced Features.
- It shows the Cron jobs panel. To continue, select CREATE CRON JOB from the menu.
- It displays the Create Cron Job panel. By entering values in the Minute, Hour, Day of Month, Month, and Day of Week fields, we can configure the Cron job’s time interval.
- Check the box next to Run on @reboot if we want to run a Cron job when we reboot.
- In the Command field, enter the Cron job command, and then select the CREATE button.
- Finally the Cron job is listed in the Cron Jobs panel and a success message is displayed.
- To receive Cron job output via email, enter the email address in the “Send all Cron output to E-mail” section. Then, click “Save” to save the information.
Several Relevant Facts About Cron Job
- The indicated numbers and * are acceptable Cron time values.
- We can specify specific times by separating them with commas. For e.g., 1,2,3.
- Spans can be specified by using a dash. For e.g., 5-7.
- Use a star and a forward slash to specify intervals. For e.g., */2.
- To make a more exact schedule, we can combine them. For e.g., 1,5,11-15,30-59/2. This means minutes 1, 5, 11 to 15 and every 2nd minute between 30 and 59.
Sometimes we need to change the file permission for the script we want to use with a Cron job to 755, depending on the server configuration. Cron jobs can also be set up for users by the server administrator via SSH, though DirectAdmin does not advise this. To modify the Cron jobs for username, enter the command crontab -u username -e
. For e.g.,
[root@web ~]# crontab -u bobcares -e
To view the cron jobs for a specific user, use the the command: crontab -u username -l
. For e.g.,
[root@web ~]# crontab -u bobcares -l
[Seeking an answer to another question? We’re only a click away.]
Conclusion
Cron jobs are a great tool for automating routine tasks. To save disc space, for instance, we could configure a Cron job to remove temporary files every week. To conclude, our Support team provides the simple methods to setup DirectAdmin Cron through the above steps.
PREVENT YOUR SERVER FROM CRASHING!
Never again lose customers to poor server speed! Let us help you.
Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.
var google_conversion_label = "owonCMyG5nEQ0aD71QM";
0 Comments