Setting up a scheduled task on a server can be quite frightening and scary even. That is if you don’t know the steps to go by. It can be quite tiring to have to remember to run a task on your server on a daily basis. Especially if you can just schedule the task and it will run itself on a regular basis. I’m sure you’re wondering how to go about this, well, Cron is the way to go.
Cron is a service created to execute scheduled commands and tasks. It allows you to run a task or a command at times set by for the job. For example, maybe your computer’s disk space is easy clogged up by temporary files. And you need to make sure to delete them every week so your disk space is not being used up. You can schedule this task with
Step by Step Process on How to Set up a Cron job
- To begin with, you need to log in to your cPanel web hosting account. If you don’t have one then you need to create one.
- Under the advanced section provided, you will see a ‘
cronjobs’ icon, click right on it.
- Next, you need to make sure your email address provided is valid.
Cronjob will be sending you updates on tasks or commands carried out. If the email address is not a valid one, then enter a valid email address and click on the ‘update email’ button provided.
- Next, you need to set the frequency which you would like your
cronjob to be carried out. You can do this by using the drop-down box located by each setting. Thisincludes minutes, hours, days, weekdays and months settings. You can also set the frequency by clicking the ‘common setting’ box so you can choose from a list of predefined frequently used intervals. This list rage from every minute to monthly, weekly and even once a year.
- Once you’ve set the frequency you will prefer, then add the command or task you would like to set and then click the ‘add new
cronjob’ button to complete the setting
Once this is done, then you have successfully created a
Also read on how to setup Cloudflare
If you followed the step by step process listed above, then you can relax and let the cron job do your biddings for you efficiently. While informing you through an email of every successful task carried out. If this article was helpful in educating you on how to set up a cron job or you have questions generally, then reach out to us in the comment session provided below.