Example Cron Statements for BVQ Alerting
In BVQ alerts are scheduled by default to trigger whenever new data arrives from the scanners. This is the simplest and most commonly used scheduling method, as it is set as the default.
However, for more specific use cases, you can define custom alert schedules using cron expressions. To do this, switch the BVQ Alert Editor to Expert Mode and enter the desired cron expression in the Schedule tab of the editor.
For example, some alert rules may need to avoid running during backup windows. Using cron expressions, you can precisely define such schedules to meet your requirements. Since creating cron expressions can be complex, we’ve provided a table of typical cron patterns below for easy reference.
Cron Expression | Description | Explanation |
---|---|---|
| Every 5 minutes | Second: At |
| Every 10 minutes | Second: At |
| Every 15 minutes | Second: At |
| Every 30 minutes | Second: At |
| Every hour | Second: At |
| Every hour from 8 AM to 6 PM on weekdays | Second: At |
| Every 5 minutes during business hours (9 AM to 5 PM) on weekdays | Second: At |
| At 12:00 PM every day | Second: At |
| Twice daily at 6:00 AM and 6:00 PM | Second: At |
The cron pattern has 6 fields, each separated by spaces. It is structured as follows:
[second] [minute] [hour] [day of month] [month] [day of week]
Fields and Their Options:
Second (
[0-59]
):Specifies the exact second to execute the job.
Examples:
0
(start of the minute),*/15
(every 15 seconds).
Minute (
[0-59]
):Specifies the minute of execution.
Examples:
0
(top of the hour),*/5
(every 5 minutes),15,30,45
(at 15th, 30th, and 45th minute).
Hour (
[0-23]
):Specifies the hour of the day for execution.
Examples:
0
(midnight),9
(9:00 AM),9-17
(every hour from 9 AM to 5 PM).
Day of Month (
[1-31]
or?
):Specifies the day of the month.
Options:
Specific day:
15
(15th of the month).Range:
1-5
(1st to 5th).Increment:
1/5
(every 5 days starting from the 1st).Special:
L
(last day),W
(nearest weekday).?
: No specific value (used whenday of week
is specified).
Month (
[1-12]
orJAN-DEC
):Specifies the month of execution.
Examples:
1
(January),6,7,8
(June, July, August),JAN,JUL,DEC
.
Day of Week (
[0-7]
orSUN-SAT
or?
):Specifies the day of the week.
Options:
Specific day:
MON
(Monday),6
(Saturday).Range:
MON-FRI
(weekdays).Increment:
MON#2
(2nd Monday of the month).Special:
L
(last day of the week, e.g., last Friday).?
: No specific value (used whenday of month
is specified).
Special Symbols and Their Uses:
*
(Wildcard): Matches all possible values in the field.?
(No Specific Value): Used in eitherday of month
orday of week
to avoid conflicts.-
(Range): Specifies a range of values (e.g.,1-5
).,
(List): Specifies multiple values (e.g.,MON,WED,FRI
)./
(Increment): Specifies increments (e.g.,*/10
for every 10 units).L
(Last): Used for the last value inday
orweekday
fields.W
(Weekday): Nearest weekday to the specified day.#
(Nth): Specifies the Nth occurrence of a day in a month (e.g.,2#3
is the 3rd Monday).
Example Patterns:
0 */5 * * * ?
: Every 5 minutes, ignoring day constraints.0 0 9-17 * * MON-FRI
: Every hour from 9 AM to 5 PM on weekdays.0 0 0 1 * ?
: Midnight on the 1st of each month.