Skip to main content

Time Triggers​

A Time Trigger starts a Job on a schedule. This page describes the Time Trigger window. On the Settings tab you describe the Trigger and choose its type. The Interval, Custom and Expire tabs each have their own page.

To open the window, go to the Job's Triggers tab and click Add -> Time Trigger -> Interval or Add -> Time Trigger -> Custom. The Add menu is on the toolbar and on the shortcut menu of the Trigger list (right-click the list). The item you click preselects the Time trigger type.

Settings tab​

Time Trigger window, Settings tab: the Main settings group with an empty Description box, Auto description and Auto refresh description checked, and Time trigger type set to Interval time trigger. The Custom tab is unavailable and the status bar shows Next run.

The Settings tab contains the Main settings group with the following fields:

Description

Enter a description that distinguishes the Trigger from others in the Trigger list. With the default settings, VisualCron replaces what you type here when you click Ok. To keep your own text, clear Auto refresh description.

Auto description

When checked, VisualCron fills Description from the Trigger's settings when you click Ok, if Description is empty. Checked by default.

Auto refresh description

When checked, VisualCron regenerates the description every time you click Ok and replaces any text in Description. Available only when Auto description is checked. Checked by default.

Time trigger type

Two options select the type of schedule:

Only the selected type's tab is available. Selecting Interval time trigger makes the Custom tab unavailable, and selecting Custom time trigger makes the Interval tab unavailable. While the window is open, you can switch between the types without losing what you entered on either tab. When you click Ok, only the selected type's schedule is used, and it is what you see when you reopen the Trigger. Settings you entered on the other tab are not kept.

Choosing between Interval and Custom​

Interval and Custom are two different ways to describe a schedule. Neither type can express everything the other can.

  • An Interval time trigger counts from a start time. It runs every N days, hours, minutes or seconds, on chosen days of the week (every week, or every N weeks for a single day), or on chosen days of the month every N months. The days of the month can include the last day, a numbered weekday (for example, the second Tuesday) and a numbered workday. Use it for "every 3 days", "every 15 minutes" or "the second Tuesday of the month". See Interval Time Triggers for the settings that need care.
  • A Custom time trigger matches calendar values. The Job runs at every moment whose year, month, day, hour, minute and second all match your choices. Use it to limit a schedule to certain hours or weekdays, for example "every 30 minutes from 08:00 to 17:30, Monday to Friday". An Interval time trigger cannot express that combination.

Interval tab​

Time Trigger window, Interval tab: Interval set to Daily, Every set to 1 Day(s), and a Start time date and time at the bottom. The Custom tab is unavailable and the status bar shows Next run.

Sets a schedule that is counted from a start time. Available when Interval time trigger is selected. See Interval Time Triggers.

Custom tab​

Time Trigger window, Custom tab, Year sub-tab: Every year selected. The Choose year(s) list of twenty years, all checked, its Deselect all button and the Between years lists are unavailable. The Interval tab is unavailable.

Sets a schedule by matching year, month, day, hour, minute and second values. Available when Custom time trigger is selected. See Custom Time Triggers.

Expire tab​

Time Trigger window, Expire tab: the Time expiration group with Use trigger expiration cleared, and the Expiration date and time, Deactivate trigger (selected) and Delete trigger unavailable.

Check Use trigger expiration to set an Expiration date and time. Then choose what happens to the Trigger at that moment: Deactivate trigger (default) or Delete trigger. Before you turn expiration on, read the warning about the default date on Time Trigger - Expiration.

Next run​

The status bar at the bottom of the Time Trigger window shows Next run for this Trigger. It updates automatically as you change the settings and is calculated in Server time. The status bar of the Job window also shows a Next run value: that one is for the Job as a whole, based on its active Time Triggers.

Next run is a preview. The Trigger takes effect after you click Ok in the Time Trigger window and then Ok in the Job window.

Next run can show:

  • A date and time: the next run that matches the current settings
  • "Never": the settings do not produce a run (a Custom Time Trigger looks no more than 20 years ahead)
  • "Server off": the Server is turned off, so it does not run schedules or activate Triggers

Server time and missed runs​

Time Triggers use the Server's local time and time zone. A Trigger has no time zone setting, and the times you enter in the Time Trigger window are Server times.

If the VisualCron service was stopped when a Job was due, the Job runs once when the service starts. This happens only if the Job is active, Run missed Job once at start is checked on the Job's Main settings tab, and the Server is not turned off. See Job - Main Settings. The missed run starts the Job directly: it does not wait for a Trigger dependency.

Time exceptions are applied when a run is due, not in Next run. Next run can show a time that falls inside one of the Job's time exceptions, and that run is skipped. A missed run at start that falls inside a time exception is skipped too. See Job - Time Exceptions.