lot_manager/cron_set.sh

8 lines
297 B
Bash
Raw Normal View History

2023-12-28 16:54:53 +08:00
#!/bin/bash
set -e
sudo crontab -l > cron.cron
echo "0 8 * * * sudo /usr/bin/python /home/pi/lot_manager/open_led.py" >> cron.cron
echo "0 18 * * * sudo /usr/bin/python /home/pi/lot_manager/close_led.py" >> cron.cron
sudo crontab cron.cron
sudo systemctl restart cron.service
sudo rm -rf cron.cron