2024-12-29 02:53:37 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2024-12-29 03:14:51 +01:00
|
|
|
# Week number since 1970 modulo 4
|
|
|
|
week=$(expr $(date +%s) / 604800 % 4)
|
2024-12-29 02:53:37 +01:00
|
|
|
|
2024-12-29 03:14:51 +01:00
|
|
|
case $week in
|
2024-12-29 02:53:37 +01:00
|
|
|
1)
|
|
|
|
/usr/bin/docker exec lab-signal-bot-lab-bot-1 \
|
|
|
|
python create_task.py "LeineLab putzen" 2 "in 7 days" \
|
|
|
|
--pad-template-url "https://pad.leinelab.org/leinelab-putzen-only-weekly"
|
|
|
|
;;
|
|
|
|
2)
|
|
|
|
/usr/bin/docker exec lab-signal-bot-lab-bot-1 \
|
|
|
|
python create_task.py "LeineLab putzen" 4 "in 7 days" \
|
|
|
|
--pad-template-url "https://pad.leinelab.org/leinelab-putzen-fortnightly"
|
|
|
|
;;
|
|
|
|
3)
|
|
|
|
/usr/bin/docker exec lab-signal-bot-lab-bot-1 \
|
|
|
|
python create_task.py "LeineLab putzen" 4 "in 7 days" \
|
|
|
|
--pad-template-url "https://pad.leinelab.org/leinelab-putzen-monthly"
|
|
|
|
;;
|
|
|
|
4)
|
|
|
|
/usr/bin/docker exec lab-signal-bot-lab-bot-1 \
|
|
|
|
python create_task.py "LeineLab putzen" 4 "in 7 days" \
|
|
|
|
--pad-template-url "https://pad.leinelab.org/leinelab-putzen-fortnightly"
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
echo "Invalid choice"
|
|
|
|
;;
|
|
|
|
esac
|