feat(upbank2firefly): add a systemd timer that triggers transaction sync every hour
This commit is contained in:
parent
d9785dcd05
commit
674f06182e
1 changed files with 18 additions and 0 deletions
|
|
@ -45,6 +45,24 @@ in
|
|||
docker build -t compose2nix/upbank2firefly .
|
||||
'';
|
||||
};
|
||||
"upbank2firefly-getall" = {
|
||||
script = ''
|
||||
cd /srv/upbank2firefly
|
||||
docker container exec -e FLASK_APP=main upbank2firefly flask getall --since "$(date -d "1 hour ago" +"%Y-%m-%d %H:%M:%S")"
|
||||
'';
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "root";
|
||||
};
|
||||
};
|
||||
};
|
||||
timers."upbank2firefly-getall" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = {
|
||||
Unit = "upbank2firefly-getall.service";
|
||||
OnCalendar = "hourly";
|
||||
Persistent = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue