Triggers

What is a trigger?

A trigger is an event that activates (fires) the execution of a scheduled job. In short, a job is a combination of triggers and actions. Without enabled triggers, it will never run, without enabled actions, it will do nothing when scheduled. The execution is serialized, meaning that a task cannot run multiple instances at the same time, but only the first one, the others are rescheduled (maybe, depending on the misfire policy, see below). As you can see, there can be more active triggers at the same time, not only because there are more types of them, but also to refine the job's execution as much as needed. By example, one could have a trigger fire daily at noon, but another one at midnight and yet another one to a bigger interval level, maybe on a monthly basis. There is no limitation and no important performance overhead in the number of triggers.

What types of triggers are there?

There are four types of triggers, for the moment: the time-dependent, the database-dependent, the application-dependent (app events) and the user-dependent. The time-dependent are the classic scheduler events, that will automatically do repetitive tasks (there's also a "One time" only trigger), at convenient times, so one can escape the boredom and the stress of the every day must-be-done work. We think they can cover all the time intervals, from the very simple (everyday) ones to the advanced ones that need complicated formulas. The database-based triggers automatically execute when an event occurs in the database (when an entry is inserted, updated or deleted from the database). The application-based triggers are related to the Dot Net Nuke module in the Internet Information Services (IIS) service: the moments when the module is started or ended (a machine or server restart) or when a http transaction begins or finishes. On user created trigger is based on database triggers and it fires when a new user is created.

What are the misfire instructions?

The time-based triggers can be missed if the module is not running (it happens in the real world: power off, crash, machine restart, etc.), when there are no free threads to execute it or when the task is already running. Two options are available for the moment: ignore the missed task ("Do nothing") or execute it when the module is ready again ("Fire now").

Usage

Follows the Triggers layout:


As you can see, the triggers can be added from the "Add new trigger" dropdown button, where the triggers are grouped by their category. The triggers can be disabled or even deleted from the right little buttons (no text, only the nice icons). The modifications will be applied only after saving them by using the "Save" button (it can be find at the bottom of the page, but also in the top right corner). You can even delete the entire job if you want by clicking the "Delete job" button, a confirmation dialog will follow. The triggers cannot be reordered for the moment, we see no use for this right now.