-
Notifications
You must be signed in to change notification settings - Fork 0
interception.cron
wristcry edited this page Jul 8, 2026
·
12 revisions
todo: description
public cron_event(string name, TimeSpan execution_time_utc, bool trigger_once, Action<object[]> callback, params object[] parameters)| Parameter | Description |
|---|---|
| name | Unique name of the event |
| execution_time_utc | Time of execution (only HH:mm is supported) |
| trigger_once | Should event delete itself after execution |
| callback | Method to invoke when event is executed |
| parameters | Parameters that are passed to callback |
public cron_event(string name, string execution_time_utc, bool trigger_once, Action<object[]> callback, params object[] parameters)| Parameter | Description |
|---|---|
| name | Unique name of the event |
| execution_time_utc | Time of execution (only HH:mm is supported) (format must be supported by TimeSpan.Parse method) |
| trigger_once | Should event delete itself after execution |
| callback | Method to invoke when event is executed |
| parameters | Parameters that are passed to callback |
public cron_event(string name, int execution_hour_utc, int execution_minute_utc, bool trigger_once, Action<object[]> callback, params object[] parameters)| Parameter | Description |
|---|---|
| name | Unique name of the event |
| execution_hour_utc | Hour at which event will be executed |
| execution_minute_utc | Minute at which event will be executed |
| trigger_once | Should event delete itself after execution |
| callback | Method to invoke when event is executed |
| parameters | Parameters that are passed to callback |
public void execute()Force execute event
public string name { get; private set; }Unique name of the event
public TimeSpan execution_time_utc { get; set; }Time of execution (only HH:mm is supported)
public bool trigger_once { get; set; }Should event delete itself after execution
todo: description
public delegate void on_cron_event_executed_global_callback(cron_event _event)Delegate for on_cron_event_executed_global event
| Parameter | Description |
|---|---|
| _event | Event that was executed |
public static on_cron_event_executed_global_callback on_cron_event_executed_globalCalled after any cron_event was executed
public static void register_event(cron_event _event)Register event
| Parameter | Description |
|---|---|
| _event | Event to execute |
| Exception | Description |
|---|---|
| ArgumentException | Event with name defined in _event was already registered |
public static void unregister_event(string name)Unregister event
| Parameter | Description |
|---|---|
| name | Name of the event to unregister |
| Exception | Description |
|---|---|
| ArgumentException | Event with name was never registered |
public static bool is_event_exist(string name)Returns: true if event with name is currently registered, otherwise false
| Parameter | Description |
|---|---|
| name | Name of the event |
public static cron_event find_event(string name)Returns: cron_event if event with name is currently registered, otherwise null
| Parameter | Description |
|---|---|
| name | Name of the event to find |