In this documentation, we will show you how to manage your CronJobs
What is Cron Job?
Cron is a Linux utility which schedules a command or script on your server to run automatically at a specified time and date.
A Cron Job is the scheduled task itself. Cron jobs can be very useful to automate repetitive tasks.
How to add CronJob?
Login to your SetupServer.io Account and select the Server from the dashboard to which you want to Cron Job.
After that, click on “Cron Jobs” tab from the right side vertical navigation bar and click on “Add Cron Job” button.
Fill the following details in the Modal box:-
- Job Name – Provide a Job Name to your Cron Job. It is just for listing the active Cron Jobs in the list.
- User – Select the user for which you want to run that particular Job.
- Vendor – Select the vendor from the available list to provide a vendor to your cron command or script.
- Command – ‘Enter the command’ or ‘complete path to your script file’ that you wanted to run as a cron job. For eg: complete path to script file –
/home/setupserver/faithfulraccoon84523/cron.sh
- Specify the time – Specify the time for running that particular cron job. You could specify the time in any of the following formats or else you can also use our predefined settings –
- Minute – This allows you to run cron task every minute specified. For eg: If you specify “2” than cron job will run after every 2 minutes.
- Hour – This allows you to run cron task every hour. For eg: If you specify “5” than cron job will run after every 5 hours.
- Day of month – This allows you to run cron task on the specific day of each month. For eg: If you specify “4” than cron job will run on every 4th day of each month.
- Month – This allows you to run cron task every month or it’s multiple. For eg: If you specify “3” than cron job will run after every 3 months.
- Day of week – This allows you to run cron task on a specific day of each week. For eg: If you specify “2” than cron job will run on every 2nd day of each week that is on every ‘Monday’ for all upcoming weeks.
After filling all the above details, click on “Add Cron Job” button below it and your cron job will be added successfully.
How to Edit Cron Job?
To edit the cron job you previously added, click on “Edit” link corresponding to your Cron.
After changing desired fields, click on “Edit Cron Job” button below it to save the changes.
How to Delete Cron Job?
To Delete the Cron Job, click on Red “Delete Icon” corresponding to your Cron job.
After confirming the action, your cron task will be deleted successfully.