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-06 14:13:32 +08:00
|
|
|
echo "0 */1 * * * /usr/bin/bash /home/pi/lot_manager/conf/example/bash/start_dataupload_internal_one_hour.sh" >> 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
|