Create schedule from schedule...?
- Dominant language
- Python
- Stars
- 12.3k
- Forks
- 999
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
i would like to handle severeal schedules wihtin a running script.
My initial schedule is checking each minute the a mysql table whether there are some new entries.
If the conditions are given, i would like to create a new schedule on the new table row based in the data inside the new row.
That means, on schedule is checking whether new entries are given and will create schedules per row and the created schedules per row will only care about the individual row.
Is this possible?
acutally i have the script build up in a class
`
class tracker():
def __init__():
schedule.every(1).minutes.do(self.run_threaded, self.table())
while True:
print "while schedule %s" % (count)
count = count + 1
schedule.run_pending()
time.sleep(1)
def table(self, row):
# check mysql table
if condition == true:
schedule.every(10).minutes.do(self.run_threaded, self.table(row[x]))
`
Best regards,
Phil
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.