Closed jaanli closed 5 years ago
Interesting, I haven't run into that. Is there an error message or anything that could help debug?
Are you running the current version? A past version had a pretty bad try/except that might eat problems or interrupts.
Are you running it with launchctl
? I've actually been using recently BitBar so that I get a timestamp in my Mac menu bar (and a GUI way start or stop it).
Hmm good idea, not sure where to look for the error message.
Yup using launchctl
right now and running the latest version.
How are you using it with BitBar?
(Just installed it, it looks amazing thanks for the pointer :)
For BitBar I have a file named goes-east.10m.sh
in my BitBar plugin directory (for me ~/.bitbar
, but you can change it).
The file just has these contents:
#!/bin/bash
/Users/willwhitney/anaconda3/bin/python /Users/willwhitney/code/live-earth-desktop/goes-east.py
Basically you just put any file with a hashbang in that folder, and give it a name that includes how often to run the script (e.g. script.10s.py
would run every 10 seconds). Here are their docs for all the stuff you can do: https://github.com/matryer/bitbar#writing-plugins
This gives me the little globe and timestamp in my menu bar:
Also I think if you look in goes-east.plist
it says where stdout/stderr are redirected when you use launchctl
.
Awesome, that worked–thanks so much! 🙏 Love this BitBar thing.
Love this script, thank you Will. Sometimes if I close the lid on my mac or try to shut down the python script will be unresponsive. Not sure what's causing this, any ideas? I could check to see if there's a way to catch a timeout exception.