Questions tagged [apscheduler]

Advanced Python Scheduler (APScheduler) is a light but powerful in-process task scheduler that lets you schedule functions (or any other python callables) to be executed at times of your choosing.

Introduction

Advanced Python Scheduler (APScheduler) is a light but powerful in-process task scheduler that lets you schedule functions (or any other python callables) to be executed at times of your choosing.

This can be a far better alternative to externally run cron scripts for long-running applications (e.g. web applications), as it is platform neutral and can directly access your application’s variables and functions.

The development of APScheduler was heavily influenced by the Quartz task scheduler written in . APScheduler provides most of the major features that Quartz does, but it also provides features not present in Quartz (such as multiple job stores).

Features

  • No (hard) external dependencies
  • Thread-safe API
  • Excellent test coverage (tested on 2.4 - 2.7, 3.1 - 3.2, 2.5.2, 1.4.1 and 1.5)
  • Configurable scheduling mechanisms (triggers):
    • -like scheduling
    • Delayed scheduling of single run jobs (like the UNIX at command)
    • Interval-based (run a job at specified time intervals)
  • Multiple, simultaneously active job stores:

Reference

740 questions
0
votes
1 answer

Cron based scheduler in python

I have a python app that runs every one hour and needs to perform some scheduled tasks based on some DB configuration. For example, a configuration may be: Do X every day at 15:00 Do Y every Monday at 8:00 I'ts ok to have up to one hour of…
Tzach
  • 12,889
  • 11
  • 68
  • 115
0
votes
1 answer

Kill thread started from APScheduler after given time

Here is my problem: a user needs to log in via remotedesktop to a Windows server during given periods of the day. I have a working bit of code however I believe threads are never closed correctly since after a given time the program is Stopped. I…
sunshinekitty
  • 2,307
  • 6
  • 19
  • 31
0
votes
1 answer

APScheduler not executing the python

I am learning Python and was tinkering with Advanced scheduler. I am not able to gt it working though. import time from datetime import datetime from apscheduler.scheduler import Scheduler sched =…
Struggler
  • 672
  • 2
  • 9
  • 22
0
votes
1 answer

APScheduler and Unmarshallable Objects

I would like to execute a function every second. I used the APScheduler and it works fine. However, there's a great performance penalty due to the fact that during each job I recreate the object which handles the connection to a server. I would like…
remus
  • 2,635
  • 2
  • 21
  • 46
0
votes
0 answers

How to get informations about a zope/plone instance during execution?

We have a production environment (cluster) where there are two physical servers and 3 (three) plone/zope instances running inside each one. We scheduled a job (with apscheduler) that needs to run only in a unique instance, but is executing by all 6…
Leonardo Andrade
  • 2,508
  • 2
  • 18
  • 24
0
votes
1 answer

Is there an `at` style interface to `apscheduler`?

I have cgi script that sends out an email; occasionally the email server is busy and the email doesn't get sent. As part of the except clause of an emailing try construct, I'd it to try again in, say, 10 minutes or so. How would I schedule the…
Jamie
  • 7,075
  • 12
  • 56
  • 86
0
votes
1 answer

Automating scp upload without password

I am working on having APScheduler upload a data file periodically using pexepect.run('scp ...'). The scp command works fine from the command line without password authentication (keys have been shared). However, when running in a python script on…
bit_pusher
  • 158
  • 1
  • 5
0
votes
1 answer

Mandrill sends repeated emails with django mailsnake

I have a function that runs every hour with apscheduler, this verifies few conditions and according to this sends an email to an arrangement of emails from mailsnake import MailSnake mapi = MailSnake('XXXXXXXX', api='mandrill') def…
LaBE
  • 117
  • 1
  • 9
0
votes
1 answer

How to stop python Apscheduler on some condition

Actually am learning python APScheduler in this am trying one example d={'a':{'status':'n'},'b':{'status':'n'},'c':{'status':'y'}} The scheduler what i added is like below for k,v in d.items(): if d[k]['status']=='n': …
user1182090
  • 301
  • 4
  • 7
  • 20
0
votes
1 answer

Unable to add a method to add_date_job() to store jobs in a SQLAlchemyJobStore job store

Problem statement: I am trying to add a method (Test::start()) to scheduler.add_date_job() which is configured to store the jobs in a SQLAlchemyJobStore job store. The addition of the job to the job store is successful. But when I try to start the…
Sangeeth Saravanaraj
  • 16,027
  • 21
  • 69
  • 98
-1
votes
0 answers

Can not connect postgresql database in django

I want to run jobs by connecting to 2 different databases and run them in django admin. First database is default sqlite and the other is postgresql. I want to print jobs to a table in pg, when I go to admin page the table name also looks different,…
-1
votes
1 answer

get sqlalchemy with apscheduler multithreading to work

I have a list of jobs I am adding to an apscheduler BlockingScheduler with a ThreadPoolExecutor number the same size as the number of jobs. The jobs I am adding are using sqlalchemy and interacting with the same database, but i am getting…
abinitio
  • 609
  • 6
  • 20
-1
votes
1 answer

How to make apscheduler not double execute?

I have the apscheduler working but for some reason when it writes to my file it makes a double-entry every time the BackgroundScheduler is called. I'm not understanding why it writes 2 lines and the timestamp will be varied by a few milliseconds in…
kupo2001
  • 7
  • 4
-1
votes
1 answer

Is there a way to send messages to a guild's system channel, and use it in a scheduled task?

async def rules_reminder(self): channel = self.bot.guild.system_channel await channel.send("Remember to adhere to the rules!") self.scheduler.add_job(self.rules_reminder, CronTrigger(second="0, 15, 30, 45"))
Devraza
  • 5
  • 4
-1
votes
1 answer

APScheduler Using Flask python

DEBUG:apscheduler.scheduler:Next wakeup is due at 2019-12-19 12:24:50.010070+08:00 (in 4.996792 seconds) I always get this error when i run my job. It just happen when i'm using a million of data in database but when i'm using the thousand of data…
Dr.Robot
  • 9
  • 2
1 2 3
49
50