Introduction to CRON Expression

The CRON expression has a structure consisting of 5 fields, with each field representing a part of the schedule. The fields are separated by spaces. The basic structure of a CRON expression is as follows:

[minute] [hour] [day] [month] [day_of_week]

Where:

  • minute: Minutes (0-59)

  • hour: Hours (0-23)

  • day: Day of the month (1-31)

  • month: Month (1-12)

  • day_of_week: Day of the week (0-6), where 0 is Sunday and 6 is Saturday.

  • year: (Optional) Year

Common Usage Examples

Here are some examples to help you better understand how to use CRON expressions:

  • Run every day at 9 AM:

0 9 * * *
  • Run at 2 PM on weekdays (Monday to Friday):

0 14 * * 1-5

or

0 14 * * mon-fri
  • Run on the 15th day of every month at 9 AM:

0 9 15 * *
  • Run on the 15th of April every year at 6 PM:

0 18 15 4 *

Conclusion

The CRON expression is a powerful tool for scheduling tasks within Bluecore. By understanding its structure and utilizing real-world examples, you can leverage this feature to automate tasks and optimize workflow processes.

If you need further assistance or have questions, don't hesitate to reach out to our support team. We wish you success in using CRON expressions!

Last updated