fix: setting next notificatiom task
This commit is contained in:
parent
d93b4e988d
commit
aee262aacc
@ -4,4 +4,4 @@ API_KEY=$(cat .api-key)
|
|||||||
notif "Hello, your container at SSH.SURF has hit its expire date, if not extended before 6PM EST the container will be removed automatically. Use /extend to gain another 7 days."
|
notif "Hello, your container at SSH.SURF has hit its expire date, if not extended before 6PM EST the container will be removed automatically. Use /extend to gain another 7 days."
|
||||||
|
|
||||||
date=$(curl -sH "x-ssh-auth: $API_KEY" $API_HOST/time | grep -o '"expireDate":"[^"]*' | grep -o '[^"]*$')
|
date=$(curl -sH "x-ssh-auth: $API_KEY" $API_HOST/time | grep -o '"expireDate":"[^"]*' | grep -o '[^"]*$')
|
||||||
at -t $(date -d $date +'%Y%m%d%H%M') -f /root/container-expire-notifs/notify.sh
|
at -t $(date -d $date +'%Y%m%d%H%M' -d "$end_date+7 days") -f /root/container-expire-notifs/notify.sh
|
||||||
|
Loading…
Reference in New Issue
Block a user