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

apscheduler jobs unexpectedly removed from SCHEDULER_JOBSTORES #119

Open
ZZZeno opened this issue Nov 5, 2019 · 6 comments
Open

apscheduler jobs unexpectedly removed from SCHEDULER_JOBSTORES #119

ZZZeno opened this issue Nov 5, 2019 · 6 comments

Comments

@ZZZeno
Copy link

ZZZeno commented Nov 5, 2019

I have 3 apscheduler jobs in my flask app. Two of them execute every 4 am of the day, the rest executes every hour. The rest job(executes by hour) works well until 4 am next day. (I am not sure if there is any relation between the time when the two execute and the rest one stops.)

The problem is that the job executes by hour will somehow disappear from SCHEDULER_JOBSTORES.

Flask-APScheduler==1.11.0

@ZZZeno
Copy link
Author

ZZZeno commented Nov 6, 2019

hmmm, there is no relation between three jobs. I changed the job's execute time to 5 am but the rest stoped executing at 2 am..

@viniciuschiele
Copy link
Owner

Can you show the jobs' configuration?

@ZZZeno
Copy link
Author

ZZZeno commented Nov 7, 2019

These are all the codes in my flask project..

SQLALCHEMY_DATABASE_URI = "mysql+pymysql://xxxxx"
SCHEDULER_JOBSTORES = {
        'default': SQLAlchemyJobStore(
        url=SQLALCHEMY_DATABASE_URI, 
        tablename='apscheduler_jobs'
       )
}

scheduler = APScheduler()
scheduler.init_app(app)

scheduler.add_job("analyze_log", analyze_log, trigger='interval', minutes=60, replace_existing=True)

scheduler.add_job("job1", parse_departs, trigger='cron', hour="4", replace_existing=True)
scheduler.add_job("job2", parse_users, trigger='cron', hour="4", replace_existing=True)

scheduler.start()

@viniciuschiele
Copy link
Owner

Sorry, I couldn't reproduce this issue.

@SongweiCao
Copy link

I've had the same problem, but I use redis as the scheduler_ JOBSTORES。 Redis deleted the ID of the running job. I don't know how to solve it. Please have a look

@sunny1616
Copy link

I am getting the same issue, i have 56 jobs in my job store and one of the job is getting removed from the job store. I cannot find any solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants