Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Feb 06 20:51
    pre-commit-ci[bot] synchronize #702
  • Feb 06 20:51
    pre-commit-ci[bot] edited #702
  • Feb 06 20:51

    pre-commit-ci[bot] on pre-commit-ci-update-config

    [pre-commit.ci] pre-commit auto… (compare)

  • Feb 03 22:11
    Andrei-Pozolotin commented #707
  • Feb 01 00:22
    agronholm closed #707
  • Feb 01 00:22
    agronholm closed #705
  • Jan 31 23:22
    agronholm closed #704
  • Jan 31 23:22

    agronholm on master

    Fixed SQLAlchemy 2.0 compatibil… (compare)

  • Jan 31 22:55
    agronholm commented #704
  • Jan 31 22:37

    agronholm on 3.10.0

    (compare)

  • Jan 31 22:34

    agronholm on 3.x

    Updated actions (compare)

  • Jan 31 22:31

    agronholm on 3.x

    Fixed compatibility with SQLAlc… Dropped support for Python < 3.6 (compare)

  • Jan 31 13:01
    Andrei-Pozolotin labeled #707
  • Jan 31 13:01
    Andrei-Pozolotin opened #707
  • Jan 30 23:54
    santhanam87 commented #705
  • Jan 30 20:35
    pre-commit-ci[bot] synchronize #702
  • Jan 30 20:35
    pre-commit-ci[bot] edited #702
  • Jan 30 20:35

    pre-commit-ci[bot] on pre-commit-ci-update-config

    [pre-commit.ci] pre-commit auto… (compare)

  • Jan 29 22:34
    agronholm commented #705
  • Jan 29 22:33
    santhanam87 labeled #705
gorgeousharrison
@gorgeousharrison
this is pretty much what ive been trying. lets consider 24hr intervals, that i can pick any time of the day to start the function
Alex Grönholm
@agronholm
24 hour intervals are easy
(assuming you don't actually mean exactly 24 hour intervals, but 23 or 25 are okay too)
gorgeousharrison
@gorgeousharrison
yes, for now that is all i need
Alex Grönholm
@agronholm
for that you already have the answer
gorgeousharrison
@gorgeousharrison
Thank you so much for your help Alex
Alex Grönholm
@agronholm
:ok_hand:
Wintreist
@Wintreist
image.png
image.png
image.png
image.png
Hello, the scheduler is not working) And I do not know why, the work is carried out in parallel with the asynchronous bot for telegram.
I started the logger, but it also shows that nothing is happening
Alex Grönholm
@agronholm
try starting the scheduler in the same event loop as where your main program is running
make a new function if you need to, and start the scheduler there
asyncio support in apscheduler 3 is a bit iffy
coldsnap90
@coldsnap90
hi guys im new here i had a question
when i add this job, and do the job check
scheduler.add_job(jobstore='default',func=blah1,trigger = 'interval',args=[data,x], id=f'7',start_date=f'{date} 2022-11-30',end_date=f'{date} 2022-11-30',minutes =time,max_instances =5)
on gets_jobs() next_run_time is equal to None
but when i do this
scheduler.add_job(jobstore='default',func=blah1,trigger = 'interval',args=[data,x], id=f'7',start_date='2022-11-30 12:00:00',end_date='2022-11-30 02:00:00',minutes =time,max_instances =5) it shows the jobs next run time
the date in the fstring is actually the time just made an error here
name: 2, trigger: interval[0:15:00], next run: 2022-11-30 17:31:00-08:00, handler: <function blah1 at 0x00000203BA86F640>
name: 1, trigger: interval[0:15:00], next run: None, handler: <function blah at 0x00000203BA894CA0>
coldsnap90
@coldsnap90
can the start_date , end_date not take a formatted string? and any suggestions on what to do
coldsnap90
@coldsnap90
nvm so dumb figured it out
Wintreist
@Wintreist
image.png
1 reply
I tried it, but it still doesn't work(
Joe Ziminski
@JoeZiminski
Hi, I have a question about how the background scheduler works. Our application either takes commands by CLI or initialise by python API, but it doesn't spin its own event loop or run in the background. If my understanding of the docs is correct, once the CLI script or python instance is closed, the scheduler will close. Is this correct / are there any workarounds to run the scheduler for long periods (e.g. months, years) in a background process, running at startup etc?
5 replies
kyleli626
@kyleli626
Hello! Just getting started with APScheduler, and wondering if there's a good way to remove an interval job based off a condition defined in the job. Let's say I'm running a job but completion of the job without errors doesn't mean the job is successful, and I want to run it again. Once some internal logic in the job (perhaps returning True) is satisfied, the job is removed. Is there some sort of pattern that can be used for this? One possibility I was thinking of is raising an exception in the job itself, and using the event listener, but that seems inelegant. Please let me know if I'm missing something! Thanks so much
or pass the scheduler to the job, and remove it from there? that's probably better
kyleli626
@kyleli626
or the problem with that approach is the job doesn't know its own id?
Alex Grönholm
@agronholm
@kyleli626 apscheduler 4.0 solves this problem but in 3.x you can just define a static ID for the job and then use that to remove it
1 reply
Haroon Khan
@turtlecoder
Hello, Just got started with AP Scheduler, Has anyone implemented a DynamoDB-based Job store for AP Scheduler? I am thinking of writing one, but want to see if anyone has encountered any issues with it?
Ross Hytnen
@rhytnen_gitlab
Hi, I have a question about making APScheduler not paralellize jobs that are scheduled at the same time. I have several file copy jobs that may get scheduled at the same time and each one needs to happen, but it's preferrable if they don't happen simultaneously.
Is there a parameter that limits the number of active jobs that can be happening
1 reply
lowercase00
@lowercase00
Hi all, I'm wonder if there's been a recent update to the lib, the examples doesn't seem to mach the API when installed with pip (3.9.1)
For example, there is no sync scheduler, with add_schedule method
2 replies
Yusuf_M_Thon_iD
@Sunda001
Guys how to resume jobs without starting old jobs proccess?
40 replies
koffdsa
@koffdsa

Hi there,I wonder create a BackgroundScheduler job to monitor a website every hour,if it found news from the website it's will download the new title then add a new job of BackgroundScheduler which will search the new title for every week.How can i do it,i was wrote some codes:

m_scheduler = BackgroundScheduler({'timezone':'Asia/Shanghai','max_instances': 2});
m_scheduler.add_job(m_caseMonitor.fetchCase,trigger,id="monitor");
m_scheduler.start()


........ fetchCase
def fetchCase():
.......
 if len(fetch_words) > 0:
        m_scheduler.add_job(self.toutiaoMonitor,'interval',seconds = 30)

But when i wanna add a new job in,i can't start the the new job,only added in.

1 reply
hkokko
@hkokko
is it supported to launch a task and from within the task code use for example async starmap to run a number of very short lived threads. If it is supported how would the threadpoolexecutor size in the task launching code affect the number of threads launched within the task code itself
16 replies
JAKHONGIR ISMOILOV
@antaares
image.png
image.png
Hello, I have a problem. Please, help me.
heeeeeeeeeey
Alex Grönholm
@agronholm
@antaares looks like you are trying to add a job that contains a non-pickleable value
Vinay Agarwal
@vinkaga
Hello, can apscheduler capture the stdout from a job? Can it be retrieved after a job is completed?
Alex Grönholm
@agronholm
@vinkaga apscheduler doesn't have any facilities for that
talaowis
@talaowis
Hi All , I am using Apscheduler 3.7.0
and trying to run schedule tasks , my application also runs celery for email notification sending , my problem is that celery is running the schedule task as well as the apscheduler , so I am task is being run twice , once by the apscheduler and once by celery