Skip to content

Schedule a workflow programatically #25960

Answered by weide-zhou
cwgw asked this question in Actions
Discussion options

You must be logged in to vote

Hi @cwgw,

Glad to see you in Github Community Forum!

Dynamic schedule setting is not supported, you cannot dynamically set the value.

As an alternative, you can try to update the schedule setting and push to repository.
Two options here:

  1. Directly update cronsetting via git command.
  2. If you’d like to use rest api, you can use repository_dispatch event, add the cornsetting in the payload value, trigger repository_dispatch event to update the cornsetting.
    My workflow shows the cornsetting value is updated.
    https://github.com/weide-zhou/schedulewf1/runs/868756211?check_suite_focus=true#step:5:9

Thanks

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@mariusfilipowski
Comment options

Answer selected
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants