blob: a31c543cb0fe6905992b9834a4c7a89e475928d7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
"""
Basic example showing how to schedule a callable using a textual
reference.
"""
from apscheduler.scheduler import Scheduler
if __name__ == '__main__':
scheduler = Scheduler(standalone=True)
scheduler.add_interval_job('sys:stdout.write', args=['tick\n'], seconds=3)
print('Press Ctrl+C to exit')
try:
scheduler.start()
except (KeyboardInterrupt, SystemExit):
pass
|