forked from LeineLab-Public/lab-signal-bot
Automatically get weeknumber in putzen.sh
This commit is contained in:
parent
e790392250
commit
0f8284afce
@ -1,11 +1,9 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
if [ -z "$1" ]; then
|
# Week number since 1970 modulo 4
|
||||||
echo "Usage: $0 [1-4]"
|
week=$(expr $(date +%s) / 604800 % 4)
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
case $1 in
|
case $week in
|
||||||
1)
|
1)
|
||||||
/usr/bin/docker exec lab-signal-bot-lab-bot-1 \
|
/usr/bin/docker exec lab-signal-bot-lab-bot-1 \
|
||||||
python create_task.py "LeineLab putzen" 2 "in 7 days" \
|
python create_task.py "LeineLab putzen" 2 "in 7 days" \
|
||||||
|
Loading…
Reference in New Issue
Block a user