kubiya_scheduled_task
Provides a Kubiya Scheduled Task resource to automate agent execution.
kubiya_scheduled_task (Resource)
Provides a Kubiya Scheduled Task resource. This allows scheduled tasks to be created, updated, and deleted on the Kubiya platform. Scheduled tasks execute a Kubiya agent on a defined schedule.
Example Usage
Argument Reference
The following arguments are supported:
Required Arguments
name
- (Required) The name of the scheduled task.description
- (Required) A description of the scheduled task.agent
- (Required) The name of the agent to execute.schedule
- (Required) A cron expression defining when the task should run. For example:0 9 * * *
- Daily at 9 AM0 9 * * MON-FRI
- Weekdays at 9 AM0 0 1 * *
- Monthly on the 1st at midnight*/15 * * * *
- Every 15 minutes
Optional Arguments
prompt
- (Optional) The prompt to send to the agent when executing.enabled
- (Optional) Whether the scheduled task is enabled. Defaults to true.notification
- (Optional) Configuration for task notifications.method
- The notification method. Values: "Slack", "Teams", "Email".destination
- The destination for notifications.team_name
- Required for Teams notifications, the team name.
Attribute Reference
In addition to the arguments above, the following attributes are exported:
id
- The ID of the scheduled task.last_run
- The timestamp of the last execution.next_run
- The timestamp of the next scheduled execution.status
- The current status of the scheduled task.
Import
Scheduled tasks can be imported using the id
: