Can be used to build periodic scheduling, and very reliable
You can control the minute, hour, day, etc, that it has been executed and can have control over it when it runs
Cron job does not occupy memory when it is not running. It occupies memory only when it runs
you can easily write the code & you can manage its operation and It eliminates the looping and timing logic so you can run crontab to change the timing or can shut it off.
When the Cron job fails and exits for a reason. It will start again when the proper time comes
But apart from the benefit of the Cron job, it has a few disadvantages. Cron job will not check for dependencies or other programs or servers, it also will not signal or start downstream dependencies, its child program must re-started every 120s and also it does not provide tight scheduling constraints(like sub-sec or near real time) How to use Cron job in Linux/Unix? To create a Cron job, follow the steps below:it very useful when we are performing repetitive tasks
- Click on the “Cron Jobs” icon inside cPanel, under Advanced. (Check your shared hosting username and password in your welcome email)
- Make sure the current email address is valid. If not, enter a new email and click the “Update Email” button.
- Choose the Standard Setting you require. That command automatically converts each separate time frames.
- Alternatively, you may connect the unique time settings. Minute, Hour, Day, Month and Weekday can be adjusted to obtain your objectives.
- In the input box to the right of “Command”, type the name of the file type, then add a space and provide the path to the file which you would like the command to run.
- Click the “Add New Cron Job” button.
- Click on the “Cron Jobs” icon inside cPanel.
- Scroll down to the last part called “Current Cron Jobs”.
- Find the right Cron job and click both “Edit” or “Delete”, under Actions.
- Edit and make the correct automatic tools, therefore it may be simpler to copy the Command, remove the Cron job, and recreate this.