Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
  • Jan 29 22:34
    agronholm commented #705
  • Jan 29 22:33
    santhanam87 labeled #705
  • Jan 29 22:33
    santhanam87 opened #705
  • Jan 27 14:08
    pre-commit-ci[bot] synchronize #704
  • Jan 27 14:07
    cfytrok opened #704
  • Jan 21 09:18
    jatinwatts commented #445
  • Jan 16 20:08

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

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

  • Jan 16 20:08
    pre-commit-ci[bot] opened #702
  • Jan 16 17:38
    ohayak synchronize #701
  • Jan 16 17:30
    ohayak opened #701
  • Jan 11 12:45
    wonjerry closed #700
  • Jan 11 12:45
    wonjerry commented #700
  • Jan 11 11:03
    agronholm commented #700
  • Jan 11 11:02
    agronholm commented #700
  • Jan 11 09:47
    wonjerry opened #700
  • Jan 11 09:47
    wonjerry labeled #700
  • Jan 11 08:27
    Pad0y labeled #699
  • Jan 11 08:27
    Pad0y opened #699
  • Jan 11 06:40
    xiazhibin closed #696
  • Jan 07 09:22
    agronholm closed #698
gorgeousharrison
@gorgeousharrison
exactl
Alex Grönholm
@agronholm
and that code includes instructions to add a new job to do the same
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