Skip to content

Commit

Permalink
scheduler test
Browse files Browse the repository at this point in the history
  • Loading branch information
cmharlow committed Apr 28, 2016
1 parent 728bd29 commit ca2e633
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
APScheduler==3.1.0
dulwich==0.9.7
funky==0.0.2
gitdb==0.6.4
Expand All @@ -6,7 +7,9 @@ isodate==0.5.4
paramiko==1.10.0
pycrypto==2.6
pyparsing==2.1.1
pytz==2016.4
rdflib==4.2.1
six==1.10.0
smmap==0.9.0
tzlocal==1.2.2
websocket-client==0.37.0
13 changes: 13 additions & 0 deletions sched.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import os
from apscheduler.schedulers.blocking import BlockingScheduler

if __name__ == '__main__':
scheduler = BlockingScheduler()
scheduler.add_job('sys:stdout.write', 'interval', seconds=3,
args=['tick\n'])
print('Press Ctrl+{0} to exit'.format('Break' if os.name == 'nt' else 'C'))

try:
scheduler.start()
except (KeyboardInterrupt, SystemExit):
pass

0 comments on commit ca2e633

Please sign in to comment.