Skip to content

Commit

Permalink
Fix timing of tweets
Browse files Browse the repository at this point in the history
  • Loading branch information
Chuck Logan Lim committed Mar 3, 2016
1 parent c477a05 commit 9bc8d97
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions chucks_twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,21 +35,21 @@ def startTweeting(self, mode):
print 'Scheduling tweets...'
if mode == 'mealreminders':
update = u'@chuckoy, eat breakfast!'
time = [0, 30, 0]
time = [19, 30, 0]
now = datetime.today()
future = (now + timedelta(days=1)).replace(hour=time[0], minute=time[1], second=time[2])
secs = self.calculateDelay(future, now)
Timer(secs, self.recurringTweet, [update, time]).start()

update = u'@chuckoy, eat lunch!'
time = [4, 30, 0]
time = [23, 30, 0]
now = datetime.today()
future = (now + timedelta(days=1)).replace(hour=time[0], minute=time[1], second=time[2])
secs = self.calculateDelay(future, now)
Timer(secs, self.recurringTweet, [update, time]).start()

update = u'@chuckoy, eat dinner!'
time = [10, 30, 00]
time = [5, 30, 00]
now = datetime.today()
future = (now + timedelta(days=1)).replace(hour=time[0], minute=time[1], second=time[2])
secs = self.calculateDelay(future, now)
Expand Down

0 comments on commit 9bc8d97

Please sign in to comment.