Skip to content

Instantly share code, notes, and snippets.

@lando2319
Created December 26, 2023 03:02
Show Gist options
  • Save lando2319/dfa3a81adaa14c0ad982e15dbadbec95 to your computer and use it in GitHub Desktop.
Save lando2319/dfa3a81adaa14c0ad982e15dbadbec95 to your computer and use it in GitHub Desktop.
crontab backup macMini
# Backed up 2023-12-25
######
# CRONTAB
######
# also see `sudo crontab -e`
# In order to get the full screen to work
# crontab is doing screen opening while `sudo crontab` is doing everything else
# I could move everything from sudo crontab to crontab is I wanted
# I'd have to adjust some pathways
*/20 4,6,8,10,12,14,17,19,21 * * * /bin/bash /Users/mikeland/WeatherWindow/closeChromeReopen.sh >> /Users/mikeland/WeatherWindow.log 2>&1
14,44 4,6,8,10,12,14,17,19,21 * * * /bin/bash /Users/mikeland/WeatherWindow/setQuery.sh >> /Users/mikeland/WeatherWindow.log 2>&1
17,20,47,50 4,6,8,10,12,14,17,19,21 * * * /usr/local/bin/node /Users/mikeland/WeatherWindow/downloadMidjourneyImage.js >> /Users/mikeland/WeatherWindow.log 2>&1
59 4,6,8,10,12,14,17,19,21 * * * /usr/local/bin/node /Users/mikeland/WeatherWindow/genHTMLPageByPlatform.js midjourneyImage >> /Users/mikeland/WeatherWindow.log 2>&1
39 4,6,8,10,12,14,17,19,21 * * * /usr/local/bin/node /Users/mikeland/WeatherWindow/genHTMLPageByPlatform.js openAIImage >> /Users/mikeland/WeatherWindow.log 2>&1
19 4,6,8,10,12,14,17,19,21 * * * /usr/local/bin/node /Users/mikeland/WeatherWindow/genHTMLPageByPlatform.js stableDiffusionImage >> /Users/mikeland/WeatherWindow.log 2>&1
17 12 * * * /usr/local/bin/node /Users/mikeland/infinityRacerLevelGenerator/genLevel.js >> /Users/mikeland/infinityRacerLevelGenerator/genLevel.log 2>&1
59 23 * * SUN rm /Users/mikeland/WeatherWindow.log
58 23 * * SUN rm /Users/mikeland/infinityRacerLevelGenerator/genLevel.log
#######
# sudo Crontab
######
# user crontab at `crontab -e` is handling opening the screen, here, `sudo crontab -e` is handling everything else
# Weather Window
00,17 4,6,8,10,12,14,17,19,21 * * * /usr/local/bin/node /Users/mikeland/WeatherWindow/setQuery.js >> /tmp/WeatherWindow.log 2>&1
01,31 4,6,8,10,12,14,17,19,21 * * * source /Users/mikeland/WeatherWindow/venv/bin/activate && /Users/mikeland/WeatherWindow/venv/bin/python3 /Users/mikeland/WeatherWindow/genStableDiffusion.py >> /tmp/WeatherWindow.log 2>&1
13,43 4,6,8,10,12,14,17,19,21 * * * /usr/local/bin/node /Users/mikeland/WeatherWindow/genOpenAIImage.js >> /tmp/WeatherWindow.log 2>&1
18,21,48,51 4,6,8,10,12,14,17,19,21 * * * /usr/local/bin/node /Users/mikeland/WeatherWindow/tweetImages.js >> /tmp/WeatherWindow.log 2>&1
# HN Vimmy Bot
30 * * * * /usr/local/bin/node /Users/mikeland/HN_Vimmy_Bot/index.js >> /tmp/HN_Vimmy_Bot.log 2>&1
# HN Kotlin Bot
45 * * * * /usr/local/bin/node /Users/mikeland/HN_Vimmy_Bot/index.js kotlin >> /tmp/HN_Kotlin_Bot.log 2>&1
# Clear Logs
0 23 * * SUN /bin/bash /Users/mikeland/removeLogFiles.sh >> /tmp/WeatherWindow.log 2>&1
# Backup Images
5 23 * * SUN /bin/bash /Users/mikeland/WeatherWindow/utility/backupImages.sh >> /tmp/WeatherWindow.log 2>&1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment