Cron job every x hours

Is there a way to schedule a cron for every x hours? I tried the below but got an error.

  nightly:
    triggers:
      - schedule:
          cron: "0 */6 * * *" # use cron syntax to set the schedule
          filters:
            branches:
              only:
                - master
                - beta

command: "# Config does not conform to schema: {:workflows {:nightly {:triggers [{:schedule {:cron (not (:circleci.specs.cron/posix-expr \\\"0 */6 * * *\\\"))}}]}}}\n# \n# -------\n# Warning: This configuration was auto-generated to show you the message above.\n# Don't rerun this job. Rerunning will have no effect.\nfalse"

:wave: The issue is occurring with the */6 in your example, or step syntax. This is not supported, please check out the note in the docs here:

In this instance you would need to specify a list such as: * 0,6,12,18 * * *

1 Like

Thank you I appreciate it.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.