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

cron execute non enabled tasks #13174

Closed
2 of 7 tasks
rozhuk-im opened this issue Oct 16, 2020 · 8 comments
Closed
2 of 7 tasks

cron execute non enabled tasks #13174

rozhuk-im opened this issue Oct 16, 2020 · 8 comments

Comments

@rozhuk-im
Copy link

rozhuk-im commented Oct 16, 2020

  • Gitea version (or commit ref): 1.12.4
  • Git version: 2.28.0
  • Operating system: FreeBSD 12.2 amd64
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Some disabled cron tasks always run at 11.40.

We got in logs:

Cron: Reinitialize all missing Git repositories for which records exist has finished
Cron: Delete all repositories missing their Git files has finished

But we have set in config:

; Reinitialize all missing Git repositories for which records exist
[cron.reinit_missing_repos]
ENABLED = false
RUN_AT_START = false
NO_SUCCESS_NOTICE = true
SCHEDULE = @every 72h

; Delete all repositories missing their Git files
[cron.delete_missing_repos]
ENABLED = false
RUN_AT_START = false
NO_SUCCESS_NOTICE = true
SCHEDULE = @every 72h

and even without this tasks run.

URL: admin/monitor - show that tasks never run and no 'Next Time' = Mon, 01 Jan 0001 00:00:00 +0000.

I am suspect that all tasks that have Schedule: "@every 72h" run in any case, even if Enabled: false set.

@rozhuk-im rozhuk-im changed the title cron run non enabled tasks cron runs non enabled tasks Oct 16, 2020
@rozhuk-im rozhuk-im changed the title cron runs non enabled tasks cron execute non enabled tasks Oct 16, 2020
@rozhuk-im
Copy link
Author

rozhuk-im commented Oct 16, 2020

@zeripath Can you look into this, please?

@techknowlogick
Copy link
Member

Are you able to update to the latest stable version (1.12.5) as there were fixes in that related to your issue

@rozhuk-im
Copy link
Author

I do it right now, and will see results at least after 72h.

IMHO you can simple reproduce this: change in modules/cron/tasks_extended.go all @every 72h to something like @every 1m and see what happen and same in app.ini.

@rozhuk-im
Copy link
Author

Also I see Cron: Update Mirrors has finished but NO_SUCCESS_NOTICE = true is set.

@zeripath
Copy link
Contributor

In terms of the configuration issue that was solved with #12939 and its backport #12943 - I'm sorry that was there for so long - but it's really helpful if when you find a bug if you could please check the changelog of the newest version or consider upgrading to it.

Regarding Reinit missing repositories, the code is very simple:

  • For each repository in the db
  • Check if its directory exists
  • Reinitialise if not.

Why are your directories disappearing? That's the more important question.

@rozhuk-im
Copy link
Author

I have seen these changes before open this issue.
I am not sure that these changes fix this issue.

@zeripath
Copy link
Contributor

zeripath commented Oct 16, 2020

Please upgrade to 1.12.5 as it will fix the issue of the execution of non-enabled tasks.

@rozhuk-im
Copy link
Author

Sorry for noise, looks like it fixed.

I start another bug with cron staff: #13179

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants