Helen
Helen

Reputation: 533

Trigger GitHub action manually and on schedule

I want to trigger GitHub action manually and on schedule but the following code produces and error

name: Update data

on: 
   workflow_dispatch
   schedule:
     - cron: "0 5 */30 * *"

I'm searching for the solution how to do it correctly and have both options.

Upvotes: 19

Views: 6975

Answers (1)

banyan
banyan

Reputation: 4182

you need a colon after workflow_dispatch.

name: Update data

on: 
   workflow_dispatch:
   schedule:
     - cron: "0 5 */30 * *"

Upvotes: 33

Related Questions