You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"""Version Details: Python 3.7.4 async-cron==1.6.1"""importasyncioimportsysfromasync_cron.jobimportCronJobfromasync_cron.scheduleimportSchedulerdeftest(name):
print(name)
sch=Scheduler(locale='en', check_interval=1)
job1=CronJob()
job1.at('2020-01-18 22:34').go(test, ('test_job',)) # Does not get triggered when time is elapsedjob2=CronJob()
job2.at('22:34').go(test, ('test_job',)) # Job triggered but fails with: TypeError: shift() keywords must be stringsif__name__=='__main__':
try:
print('Start')
sch.add_job(job1)
sch.add_job(job2)
loop=asyncio.get_event_loop()
loop.run_until_complete(sch.start())
exceptKeyboardInterrupt:
sys.exit()
The text was updated successfully, but these errors were encountered:
job1, not triggered because default time is utc, you did not specify the timezone info, time_shift params of at function is the key. such as UTC/GMT+08:00, time_shift=8.
job2, if you use only hour and minute, you must specify the time unit , otherwise, it will not know which unit , such as daily or weekly.
The text was updated successfully, but these errors were encountered: