3 Commits

Author SHA1 Message Date
Your Name
9aa071a32d crontab add 2025-02-13 15:42:42 -05:00
Your Name
8033b7a57b automated terminal push 2025-02-13 13:39:26 -05:00
Your Name
be3461d4a5 automated terminal push 2025-02-13 13:37:53 -05:00
3 changed files with 27 additions and 13 deletions

View File

@@ -6,20 +6,10 @@ set -x
##
echo "what up????"
echo "init > consumer.bash"
####
cd /yankee-gnome-fire-consumer
pwd
ls
whoami
pkill -f "python3 consumer.py"
sleep 4
python3 consumer.py

View File

@@ -2,6 +2,8 @@ import stomp
import time
import SullyGnomeRobot
import RestAPIClient
import os
import signal
print("## ")
print("## starting > JMS consumer (yankee-sully-channels-monthly)")
@@ -60,9 +62,10 @@ class MyListener(stomp.ConnectionListener):
RestAPIClient.addDownloadFailure(message.body, "error from onmessage (consumer.py)")
print("## ")
print("## starting > JMS consumer (yankee-sully-channels-monthly)")
print("## starting > (timed) JMS consumer (yankee-sully-channels-monthly)")
print("## ")
conn = stomp.Connection([('67.220.70.106', 61613)])
conn.set_listener('', MyListener())
@@ -75,10 +78,24 @@ print("## ")
print("## notification > connected to JMS server (yankee-sully-channels-monthly) 3333")
print("## ")
while True:
start_time = time.time()
print("start time /",start_time)
counter=0
while time.time() - start_time < 60:
counter = counter + 1
pass
print("waiting for 60 seconds of elapsed time: ",counter)
time.sleep(1)
print("it's been 60 seconds. what up though?")
conn.disconnect()
print("disconnected from JMS. i'll holla!")

7
crontabX Normal file
View 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