Skip to content

Hello, may I ask why two identical tasks are generated? #3

Open

Description

@china-zhoujie

Hello, may I ask why two identical tasks are generated?
2022-11-13 11:22:22,464 - uvicorn.error - INFO - Started reloader process [27370] using statreload
2022-11-13 11:22:24,330 - apscheduler.scheduler - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts
2022-11-13 11:22:24,348 - apscheduler.scheduler - INFO - Adding job tentatively -- it will be properly scheduled when the scheduler starts
INFO: Started server process [27377]
2022-11-13 11:22:24,349 - uvicorn.error - INFO - Started server process [27377]
INFO: Waiting for application startup.
2022-11-13 11:22:24,350 - uvicorn.error - INFO - Waiting for application startup.
2022-11-13 11:22:24,419 - apscheduler.scheduler - INFO - Added job "cron_task_test" to job store "default"
2022-11-13 11:22:24,419 - apscheduler.scheduler - INFO - Added job "cron_task_test" to job store "default"
2022-11-13 11:22:24,419 - apscheduler.scheduler - INFO - Scheduler started

Activity

  1. eukiseioh commented on Mar 25, 2023

    @eukiseioh

    I think is only duplicated info and didnt create the task.
    You could check the jobs are running and see if really is running two identical task.

  2. eukiseioh commented on May 15, 2023

    @eukiseioh

    here why:

    Important

    If you schedule jobs in a persistent job store during your application’s initialization, you MUST define an explicit ID for the job and use replace_existing=True or you will get a new copy of the job every time your application restarts!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions