![]() W: The letter W is used to get the nearest weekday.So if you use the L in the month field, the task will be executed at the end of every month. Such as if you use 1-10/2 in the minute field, it means the action will be performed every 2 minutes within /: It is used to divide a range of values.,: Using a comma, you can choose different intervals if you use 1,4,5 in the hour field, it will repeat the task at 1 AM, 4 AM, and 5 AM.For example, if you use the 1-3 in days field, it will repeat the task for the first 3 days in a week. -: Using the hyphen, you can specify the range. ![]() Such as an asterisk in the hour field will repeat the task every hour. *: In any of the five fields, it indicated all the possible values.So here are the operators, characters, and symbols that are used with cronjobs: Well, there are various operators that can be used when you specify the interval time. So if I want to create a cron job that is executed every 5 minutes, it would look like this: */5 * * * * command Cron job syntax and operators explainedĬrontab (cron table) is nothing but a text file where you can use the following syntax to add the task: * * * * * command(s) In simple terms, a cron job allows you to do an operation at specific intervals such as every minute, day, week, etc.īut before I explain how you can run the cron jobs at specific intervals, it is necessary to know the syntax and available options.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |