updated install script with cron jobs
All checks were successful
Tests / Run Go Tests (push) Successful in 1m35s
All checks were successful
Tests / Run Go Tests (push) Successful in 1m35s
This commit is contained in:
6
Cron/autoBackup.sh
Executable file
6
Cron/autoBackup.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
# cron-timing: 05 01 * * 1
|
||||
container_name="arbeitszeitmessung-main-db-1"
|
||||
filename=backup-$(date '+%d%m%Y').sql
|
||||
database_name=__DATABASE__
|
||||
docker exec $container_name pg_dump $database_name > /home/pi/arbeitszeitmessung-backup/$filename
|
||||
echo "created backup file: "$filename
|
||||
3
Cron/autoHolidays.sh
Executable file
3
Cron/autoHolidays.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
# Calls endpoint to write all public Holidays for the current year inside a database.
|
||||
port=__PORT__
|
||||
curl localhost:$port/auto/feiertage
|
||||
4
Cron/autoLogout.sh
Executable file
4
Cron/autoLogout.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
# cron-timing: 55 23 * * *
|
||||
# Calls endpoint to log out all users, still logged in for today
|
||||
port=__PORT__
|
||||
curl localhost:$port/auto/logout
|
||||
Reference in New Issue
Block a user