Automatically get weeknumber in putzen.sh

This commit is contained in:
lemoer 2024-12-29 03:14:51 +01:00
parent e790392250
commit 0f8284afce

View File

@ -1,11 +1,9 @@
#!/bin/sh
if [ -z "$1" ]; then
echo "Usage: $0 [1-4]"
exit 1
fi
# Week number since 1970 modulo 4
week=$(expr $(date +%s) / 604800 % 4)
case $1 in
case $week in
1)
/usr/bin/docker exec lab-signal-bot-lab-bot-1 \
python create_task.py "LeineLab putzen" 2 "in 7 days" \