argoproj / argoproj/argo-workflows
Expose Trigger Source and Schedule Metadata in CronWorkflow Executions
- Dominant language
- Go
- Stars
- 17k
- Forks
- 3.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 138
Description
# Summary
Argo CronWorkflow currently supports multiple schedules and manual triggers, but workflows have no built-in way to identify which schedule expression (out of multiple schedule expressions) triggered a run or whether the run was scheduled or manual. This feature would provide workflow authors with variables indicating the triggering cron expression and the trigger type.
## Use Cases
When would you use this?
1. Dynamically select tenants or workflow logic based on the triggering schedule.
2. Audit and differentiate between automated scheduled runs and manual executions for compliance and debugging.
3. Enable conditional workflow steps or configuration based on whether the run was triggered by a schedule or manually.
Requested Changes:
- Add a variable (e.g., `{{workflow.triggeredSchedule}})` to expose the cron expression that triggered the workflow.
- Add a variable (e.g., `{{workflow.triggerType}}`) to indicate if the workflow was triggered by a schedule (cron) or manually (manual).
---
**Message from the maintainers**:
Love this feature request? Give it a 👍. We prioritise the proposals with the most 👍.
Contributor guide
Research direction
Start by tracing how CronWorkflow scheduled and manual executions are represented and how workflow variables are exposed at execution time. Define the metadata needed to distinguish the triggering schedule expression from manual runs, then verify that both requested variables are available to workflow authors for multiple schedules and manual executions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100