2024-01-05 16:39:44 +08:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
2024-01-06 14:17:04 +08:00
|
|
|
sudo crontab -r
|
2024-01-05 16:39:44 +08:00
|
|
|
sudo crontab -l > cron.cron
|
2024-01-10 09:20:28 +08:00
|
|
|
echo "0 */5 * * * supervisorctl restart data_upload" >> cron.cron
|
2024-01-06 14:17:04 +08:00
|
|
|
echo "0 0 * * * /usr/bin/python /home/pi/lot_manager/delete_lot_data_3_days.py" >> cron.cron
|
|
|
|
echo "*/15 * * * * /usr/bin/python /home/pi/lot_manager/delete_than20G.py" >> cron.cron
|
2024-01-05 16:39:44 +08:00
|
|
|
sudo crontab cron.cron
|
|
|
|
sudo systemctl restart cron.service
|
2024-01-06 14:27:05 +08:00
|
|
|
sudo rm -rf cron.cron
|