scheduler.add_job(MY_PROCEDURE, trigger='date', args=[PARAMETERS....], next_run_time=(datetime.now() + timedelta(days=2)))Yes, you're supposed to use the run_date parameter. See
the documentation of the date trigger:
http://apscheduler.readthedocs.io/en/latest/modules/triggers/date.html#module-apscheduler.triggers.date
--
You received this message because you are subscribed to the Google Groups "APScheduler" group.
To unsubscribe from this group and stop receiving emails from it, send an email to apscheduler...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
scheduler.add_job(MY_PROCEDURE, 'date', run_date=(datetime.now() + timedelta(days=2)), args=[PARAMETERS....])Yes.
TypeError: unsupported operand type(s) for -: 'decimal.Decimal' and 'float'
[2016-10-29 14:52:01,598] ERROR in wsgi: Application exception:
Traceback (most recent call last):
File "/var/www/wsgi-scripts/BudgetDB/miniconda3/envs/budgetdb-py34-env/lib/pyt hon3.4/site-packages/apscheduler/schedulers/base.py", line 876, in _create_plugi n_instance
plugin_cls = class_container[alias]
KeyError: 'date' scheduler.add_job(MY_PROCEDURE, 'date', run_date=(datetime.now() + timedelta(days=2)), args=[PARAMETERS....])That error would suggest that you haven't properly installed
APScheduler, so the entry point for "date" is missing. Try
instantiating the trigger manually and passing it to add_job()
instead of 'date'.
jobstores = {
'default': SQLAlchemyJobStore(url='sqlite:///jobs.sqlite')
}
executors = {
'default': ThreadPoolExecutor(20),
'processpool': ProcessPoolExecutor(5)
}
job_defaults = {
'coalesce': False,
'max_instances': 3
}
scheduler = BackgroundScheduler(jobstores=jobstores, executors=executors, job_defaults=job_defaults)
scheduler.start()
Pip installing should have been enough. But to manually
instantiate the trigger, simply import the appropriate class
(apscheduler.triggers.date.DateTrigger), create an instance of it
and pass it to add_job() in place of 'date'.