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