Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

schedule cron task not working #27794

Closed
extremelyonline opened this issue Oct 26, 2023 · 5 comments
Closed

schedule cron task not working #27794

extremelyonline opened this issue Oct 26, 2023 · 5 comments
Labels

Comments

@extremelyonline
Copy link

extremelyonline commented Oct 26, 2023

Description

schedule cron task not working in a workflow, despite #22751. I am running Gitea nightly on docker.

Is there a way to debug/log this? Thank you.

on:
  push:
    paths:
      - '.gitea/workflows/workflow.yaml'
  schedule:
    - cron: '0 12 * * *'

Gitea Version

1.22.0+dev-244-g05aa91e6d

Can you reproduce the bug on the Gitea demo site?

No

How are you running Gitea?

Docker nightly

Database

SQLite

@lng2020
Copy link
Member

lng2020 commented Oct 26, 2023

In other words, this cron job will run at 12:00 PM (noon) every day.

So the cron job didn't run at 12:00 p.m.?

@puni9869
Copy link
Member

puni9869 commented Oct 26, 2023

Could you share the logs. If possible.

@extremelyonline
Copy link
Author

I am very sorry. It was a timezone problem.

@lstellway
Copy link

I am not seeing any scheduled runs for my workflow either:

on:
  schedule:
    - cron: '0 6,18 * * *'
  issue_comment:

I also set the workflow to run on issue_comment so I could trigger manually, which works great.
I setup this workflow on Friday - it is now Monday and I do not see any action runs.

Today, I additionally tried running tasks using different cron formats:

  • * * * * *
  • */2 * * * *

Can you give more details of your timezone issue?
(any configuration changes? Or just your expectation of when it was supposed to run didn't align with when it ran?)

@lstellway
Copy link

Ahh.. I see my issue:

Cron schedule support was added in #26655 and is included in v1.21.0-rc0.
I am currently behind on 1.20.5.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants