--- alias: user-guide-automation-task-core-timer-cron tags: - automation tasks description: "This documentation explains configuring and triggering tasks based on cron job schedules" --- # On Cron Job :iot-timer-cron-lg: The On Cron Job task allows the user to configure a task that will emit depending on a cron job expression. ![Screenshot showing a cron job configuration with "Timestarre" as the cron expression.](../images/on_cron_job.png) ## Inputs | Name | Data Type | Description | | ------------------- | --------- | ---------------------------------------------------------------------------------------------------------- | | CronExpression | `String` | Cron job expression | | NumberOfOccurrences | `Integer` | Number of occurrences to trigger the cron job after activation/reactivation. Leave 0 to ignore the counter | | Enable/Disable | `any` | Activates the cronjob execution | ## Outputs | Name | Data Type | Description | | --------- | ---------- | ------------------------------------------------------ | | Timestamp | `DateTime` | Current time upon execution | | Success | `Boolean` | If there was no problem emits a true | | Error | `Error` | Error that occurred during the processing of this task | ## Settings | Name | Data Type | Default | Description | | ------------------- | --------- | ------------- | ------------------------------------------------------------------------------------------------------------------ | | Auto Enable | `Boolean` | true | Activates the cronjob execution | | CronExpression | `String` | `* * * * * *` | Default Cron job expression | | NumberOfOccurrences | `Integer` | 0 | Default number of occurrences to trigger the cron job after activation/reactivation. Leave 0 to ignore the counter | ## Behavior The On Cron Job task, allows the user to configure a cron job expression and have logic that is triggered whenever the cron job expression is reached. ## Remarks There is no particular remark to be made.