Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • 15:47

    agronholm on pre-commit-ci-update-config

    (compare)

  • 15:47

    agronholm on master

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

  • 15:47
    agronholm closed #702
  • 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
gorgeousharrison
@gorgeousharrison
hu
Alex Grönholm
@agronholm
so every day it adds another job for INDI()
gorgeousharrison
@gorgeousharrison
hum
Alex Grönholm
@agronholm
so after the first day you have two jobs for running INDI()
then the next day it runs it twice and you have four jobs then
then 8 jobs, 16, etc.
gorgeousharrison
@gorgeousharrison
ok, thats why the kernels dying
what am i doing wrong
Alex Grönholm
@agronholm
trying to add a new job in the target function
gorgeousharrison
@gorgeousharrison
the scheduler portion of the code
Alex Grönholm
@agronholm
do it elsewhere
gorgeousharrison
@gorgeousharrison
ok
one argument that migh be missing is the number of max instance, i want the next day to override the past one
Alex Grönholm
@agronholm
meaning?
gorgeousharrison
@gorgeousharrison
so it calulates the indicator from 9 am to 9 am the next day, ends the job and starts a fresh one
Alex Grönholm
@agronholm
if it works 24 hours a day, with the same parameters, what do you need a scheduler for?
gorgeousharrison
@gorgeousharrison
alex, i may be extremely green at coding, but i have a very precise thing i need the code to do: run a function periodically on any decided period. so right now im just starting the basic, which is get the fucntion to run everyday at 9. i want to be able to run the same function every 2 days at 5pm for instance
Alex Grönholm
@agronholm
I just want to understand what you are trying to do, and that seems to change every time I ask
gorgeousharrison
@gorgeousharrison
it does not. its just one simple thing.
Alex Grönholm
@agronholm
so you keep saying, but this is the first time I'm hearing about "every 2 days at 5 pm"
is that the actual end goal here?
at any rate, you should move the scheduling code out of the target function
gorgeousharrison
@gorgeousharrison
no. the goal is the function to execute from different start times at different intervals. those are parameters i intend to change.
ok im im doing that now
Alex Grönholm
@agronholm
what determines the start times in the end?
gorgeousharrison
@gorgeousharrison
i do
Alex Grönholm
@agronholm
I mean, do you just hard code them or do you fetch the values programmatically?
gorgeousharrison
@gorgeousharrison
for one strategy iwant it to start the job at 9 am, for another i want it start at 5pm
Alex Grönholm
@agronholm
"every 2 days at 5 pm" requires CalendarIntervalTrigger which is only available in apscheduler 4, still in alpha
gorgeousharrison
@gorgeousharrison
right now im trying to return the function starting anytime i chos
Alex Grönholm
@agronholm
I don't recommend that for general use
you can however approximate it with CronTrigger
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)