Before getting into the topic let us learns what Cron is and how does it work?
Cron is Linux based utility that schedules a script or a command on the server to run on a specific date and time. So, a Cron job will work as a scheduled take by itself and be used for repetitive tasks automatically.
For instance, Cron Job can be set on deleting temporary files on a daily or weekly, or monthly basis to maintain the disk space.
Next, let see what are VestaCP and its uses?
VestaCP is an open-source control panel that is used for multiple purposes (like, managing various websites, email accounts, MySQL DB, FTP account, DNS records, and so on). Since it is open-source, VestaCP is free and easy to install.
Here are the steps on how to set up Cron Job into VestaCP:
Step 1: We must log in to the VestaCP account and then click on the Crontab in it.
Step 2: In there we can able to view many Cron jobs, where clicking on Cron job will help us to create a new job.
Step 3: Later, we have to specify the required job and date/time to execute the Cron job.
Step 4: We need to select any value and then need to click on the Generate button in VestaCP.
Step 5: After choosing the tab we need to schedule a job, click on Add button to get a pop-up message showing the creation has been successfully made.
Step 6: We shall make use of the button which is presented on the right side to delete or edit our job according to our requirements.
Cron is Linux based utility that schedules a script or a command on the server to run on a specific date and time. So, a Cron job will work as a scheduled take by itself and be used for repetitive tasks automatically.
For instance, Cron Job can be set on deleting temporary files on a daily or weekly, or monthly basis to maintain the disk space.
Next, let see what are VestaCP and its uses?
VestaCP is an open-source control panel that is used for multiple purposes (like, managing various websites, email accounts, MySQL DB, FTP account, DNS records, and so on). Since it is open-source, VestaCP is free and easy to install.
Here are the steps on how to set up Cron Job into VestaCP:
Step 1: We must log in to the VestaCP account and then click on the Crontab in it.
Step 2: In there we can able to view many Cron jobs, where clicking on Cron job will help us to create a new job.
Step 3: Later, we have to specify the required job and date/time to execute the Cron job.
Step 4: We need to select any value and then need to click on the Generate button in VestaCP.
- There are various tabs used in VestaCP, they are, Minutes tab, Hourly tab, Daily tab, Weekly tab, Monthly tab.
- Every tab has its characteristics to be used. Like, Minutes tab – we can set a job for required minutes by mentioning it as (*), example */20, and more. Hourly tab – can be used to set 0,15,30,45 minutes of every even 1 or 2 ….. 12 hours. Daily tab – this can be used to perform the job on every odd / even day. Weekly tab – we can set a particular task on specific days of the week. Monthly tab – we can schedule a job on every odd/even month and so date, hours, minutes can be chosen.
Step 5: After choosing the tab we need to schedule a job, click on Add button to get a pop-up message showing the creation has been successfully made.
Step 6: We shall make use of the button which is presented on the right side to delete or edit our job according to our requirements.