Advertisement
Guest User

lightshowpi schedule new

a guest
Dec 9th, 2022
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.20 KB | None | 0 0
  1. #edit cron by running "sudo crontab -e" without quotes
  2. #cron runs in root, all called scripts require full paths ie /home/pi/lightshowpi/py/hardware_controller.py
  3.  
  4. # Always put this at the top
  5. SYNCHRONIZED_LIGHTS_HOME=/home/pi/lightshowpi
  6.  
  7. # Start microweb on boot
  8. @reboot $SYNCHRONIZED_LIGHTS_HOME/bin/start_microweb
  9.  
  10. # Evening Start
  11. # Turn on the lights at 4:30pm
  12. 30 16 * * * sudo python $SYNCHRONIZED_LIGHTS_HOME/py/hardware_controller.py --state=on
  13.  
  14. # play 1 song from playlist at 5:00pm
  15. # turn lights on
  16. 00 17 * * * sudo python $SYNCHRONIZED_LIGHTS_HOME/py/synchronized_lights.py --playlist=/home/pi/lightshowpi/music/2021/.playlist && sudo python $SYNCHRONIZED_LIGHTS_HOME/py/hardware_controller.py --state=on
  17.  
  18. # play 1 song from playlist at 5:30pm
  19. # turn lights on
  20. 30 17 * * * sudo python $SYNCHRONIZED_LIGHTS_HOME/py/synchronized_lights.py --playlist=/home/pi/lightshowpi/music/2021/.playlist && sudo python $SYNCHRONIZED_LIGHTS_HOME/py/hardware_controller.py --state=on
  21.  
  22. # play 1 song from playlist at 6:00pm
  23. # turn lights on
  24. 00 18 * * * sudo python $SYNCHRONIZED_LIGHTS_HOME/py/synchronized_lights.py --playlist=/home/pi/lightshowpi/music/2021/.playlist && sudo python $SYNCHRONIZED_LIGHTS_HOME/py/hardware_controller.py --state=on
  25.  
  26. # play 1 song from playlist at 6:30pm
  27. # turn lights on
  28. 30 18 * * * sudo python $SYNCHRONIZED_LIGHTS_HOME/py/synchronized_lights.py --playlist=/home/pi/lightshowpi/music/2021/.playlist && sudo python $SYNCHRONIZED_LIGHTS_HOME/py/hardware_controller.py --state=on
  29.  
  30. # play 1 song from playlist at 7:00pm
  31. # turn lights on
  32. 00 19 * * * sudo python $SYNCHRONIZED_LIGHTS_HOME/py/synchronized_lights.py --playlist=/home/pi/lightshowpi/music/2021/.playlist && sudo python $SYNCHRONIZED_LIGHTS_HOME/py/hardware_controller.py --state=on
  33.  
  34. # play 1 song from playlist at 7:30pm
  35. # turn lights on
  36. 30 19 * * * sudo python $SYNCHRONIZED_LIGHTS_HOME/py/synchronized_lights.py --playlist=/home/pi/lightshowpi/music/2021/.playlist && sudo python $SYNCHRONIZED_LIGHTS_HOME/py/hardware_controller.py --state=on
  37.  
  38. # play 1 song from playlist at 8:00pm
  39. # turn lights on
  40. 00 20 * * * sudo python $SYNCHRONIZED_LIGHTS_HOME/py/synchronized_lights.py --playlist=/home/pi/lightshowpi/music/2021/.playlist && sudo python $SYNCHRONIZED_LIGHTS_HOME/py/hardware_controller.py --state=on
  41.  
  42. # play 1 song from playlist at 8:30pm
  43. # turn lights on
  44. 30 20 * * * sudo python $SYNCHRONIZED_LIGHTS_HOME/py/synchronized_lights.py --playlist=/home/pi/lightshowpi/music/2021/.playlist && sudo python $SYNCHRONIZED_LIGHTS_HOME/py/hardware_controller.py --state=on
  45.  
  46. # play 1 song from playlist at 9:00pm
  47. # turn lights on
  48. 00 21 * * * sudo python $SYNCHRONIZED_LIGHTS_HOME/py/synchronized_lights.py --playlist=/home/pi/lightshowpi/music/2021/.playlist && sudo python $SYNCHRONIZED_LIGHTS_HOME/py/hardware_controller.py --state=on
  49.  
  50. # play 1 song from playlist at 9:30pm
  51. # turn lights on
  52. 30 21 * * * sudo python $SYNCHRONIZED_LIGHTS_HOME/py/synchronized_lights.py --playlist=/home/pi/lightshowpi/music/2021/.playlist && sudo python $SYNCHRONIZED_LIGHTS_HOME/py/hardware_controller.py --state=on
  53.  
  54. #End of Night
  55. # Turn off the lights at 10:30pm
  56. 30 22 * * * sudo python $SYNCHRONIZED_LIGHTS_HOME/py/hardware_controller.py --state=off
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement