I want to trigger an Argo workflow to start running at a specific time. I am currently using a workflowTemplate and the rest API to submit
a workflow with this template. Is there a way to tell Argo to start the workflow at a specific time.
I am aware of the existence of cron-workflow and cron-workflow-template. But I am not able to figure out how to use either workflow or cron-workflow to achieve what I want.
To have any scheduling, do I must use cron-workflow? Or is there a way to trigger a regular workflow at a delay by passing the schedule-time in submitOptions or in some other way through the rest API?
If I must use cron workflow, what should I set the schedule value at? I don't want it to run automatically or periodically, but only when I want and at a specific time. Is there a way achieve that using cronWorkflowTemplate and the rest API?
I will appreciate any help/pointers.
Likely not the answer you're looking for, but if you are able to alter your WorkflowTemplate, you can make the first step be an immediate suspend step, with a value that is provided as an input (by you, when deciding you want to submit the workflow, just not now). For instance, your workflow may look something like this:
When you want to submit it, just pass in the parameter
wait-time-sec
. Granted, if you would rather have a specific time, you would either have to calculate how many seconds that would be before submitting, or write a simple script before thewait
step to do that calculation for you, taking in an input of a datetime and outputting seconds for thewait
step to use.