aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--scripts/report_ops@.service12
-rw-r--r--scripts/upload_to_custodians.timer10
2 files changed, 22 insertions, 0 deletions
diff --git a/scripts/report_ops@.service b/scripts/report_ops@.service
new file mode 100644
index 00000000..e5d79e6b
--- /dev/null
+++ b/scripts/report_ops@.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=Run scripts from the report_ops folder
+OnFailure=monitor@%n
+
+[Service]
+Type=simple
+User=guillaume
+Group=guillaume
+ExecStart=/usr/bin/python -m report_ops -%i
+WorkingDirectory=/home/guillaume/projects/code/python
+EnvironmentFile=/etc/serenitas.conf
+Environment=PYTHONPATH=/home/guillaume/projects/code/python
diff --git a/scripts/upload_to_custodians.timer b/scripts/upload_to_custodians.timer
new file mode 100644
index 00000000..98f7f665
--- /dev/null
+++ b/scripts/upload_to_custodians.timer
@@ -0,0 +1,10 @@
+[Unit]
+Description=Upload bond trades to custodians
+
+[Timer]
+OnCalendar=Mon..Fri 16..18:30
+Unit=report_ops@sc.service
+RandomizedDelaySec=1m
+
+[Install]
+WantedBy=timers.target