Код: Выделить всё
from apscheduler.scheduler import Scheduler
import time
def printit(sometext):
print "this happens every 5 seconds"
print sometext
sched = Scheduler()
sched.start()
sometext = "this is a passed message"
sched.add_cron_job(printit(sometext), second="*/5")
while True:
time.sleep(1)
Код: Выделить всё
TypeError: func must be callable
Подробнее здесь: https://stackoverflow.com/questions/124 ... r-function
Мобильная версия