There are several stages to manage a cron job on your web server. The first one is determining the schedule. You need to understand the ways of working of the schedule. Whether you want to run the command each day, each month, or only on certain times, you should determine it in advance.
If you are using a shared server whereas there are a lot of websites, it is much better that you rarely run the cronjob because it will affect the server work entirely. If you want to run this program on high frequency, it is better if you are changing over to the higher hosting level as VPS or even a dedicated server.
The second stage, understand the programming language. The next step you have to do is writing your schedule with the language which is understandable by the crontab. The format of the crontab consists of a row which has five star signs and ended by the command. Here is the simple example from the crontab script:
* * * * */command
- The star form above is the scheduling time. These signs enable to be replaced by numbers.
- The command enable to be replaced by the type will be run.
The first part is separated in 5 parties:
- Minutes (0-59)
- Hours (0-23)
- Day per month (1-31)
- Month (1-12)
- A Day per a week (0-6)