schedule cron task not working #11912

Closed
opened 2025-11-02 09:51:41 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @extremelyonline on GitHub (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

Originally created by @extremelyonline on GitHub (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
GiteaMirror added the type/bug label 2025-11-02 09:51:41 -06:00
Author
Owner

@lng2020 commented on GitHub (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.?

@lng2020 commented on GitHub (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.?
Author
Owner

@puni9869 commented on GitHub (Oct 26, 2023):

Could you share the logs. If possible.

@puni9869 commented on GitHub (Oct 26, 2023): Could you share the logs. If possible.
Author
Owner

@extremelyonline commented on GitHub (Oct 26, 2023):

I am very sorry. It was a timezone problem.

@extremelyonline commented on GitHub (Oct 26, 2023): I am very sorry. It was a timezone problem.
Author
Owner

@lstellway commented on GitHub (Oct 30, 2023):

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 commented on GitHub (Oct 30, 2023): I am not seeing any scheduled runs for my workflow either: ```yml 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?)_
Author
Owner

@lstellway commented on GitHub (Oct 30, 2023):

Ahh.. I see my issue:

Cron schedule support was added in https://github.com/go-gitea/gitea/pull/26655 and is included in v1.21.0-rc0.
I am currently behind on 1.20.5.

@lstellway commented on GitHub (Oct 30, 2023): Ahh.. I see my issue: Cron schedule support was added in https://github.com/go-gitea/gitea/pull/26655 and is included in [v1.21.0-rc0](https://github.com/go-gitea/gitea/releases/tag/v1.21.0-rc0). I am currently behind on [1.20.5](https://github.com/go-gitea/gitea/releases/tag/v1.20.5).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#11912