automated terminal push
This commit is contained in:
7
crontabX
Normal file
7
crontabX
Normal file
@@ -0,0 +1,7 @@
|
||||
SHELL=/bin/bash
|
||||
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
|
||||
|
||||
* * * * * /yankee-gnome-fire-consumer/consumer.bash >> /var/log/yankee.log
|
||||
|
||||
* * * * * /yankee-gnome-fire-consumer/ping.bash >> /var/log/cron.log 2>&1
|
||||
|
||||
@@ -42,11 +42,11 @@ def buildCronExecuteTime():
|
||||
|
||||
current_time = datetime.datetime.now()
|
||||
|
||||
new_minute = (current_time.minute + 2) % 60 # The % operator performs the wrap-around
|
||||
new_minute = (current_time.minute + 2) % 60
|
||||
|
||||
print("new_minute / ",new_minute)
|
||||
|
||||
new_hour = current_time.hour + (current_time.minute + 5) // 60 # Integer division for hour increment
|
||||
new_hour = (current_time.hour + 5) % 24
|
||||
|
||||
print("new_hour / ",new_hour)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user