Browse Source

add Monthly cron (bis)

Francois Deppierraz 5 months ago
parent
commit
904474d1f3
2 changed files with 4 additions and 5 deletions
  1. 4 2
      Makefile
  2. 0 3
      cotisations.service

+ 4 - 2
Makefile

@@ -1,10 +1,12 @@
 deploy:
 	scp cotisations.py root@odoo.fixme.ch:/usr/local/bin/cotisations.py
 	scp cotisations.service root@odoo.fixme.ch:/etc/systemd/system/cotisations.service
+	scp cotisations.timer root@odoo.fixme.ch:/etc/systemd/system/cotisations.timer
 
 	ssh root@odoo.fixme.ch systemctl daemon-reload
-	ssh root@odoo.fixme.ch systemctl enable cotisations.service
-	ssh root@odoo.fixme.ch systemctl restart cotisations.service
+	ssh root@odoo.fixme.ch systemctl enable cotisations.timer
+	ssh root@odoo.fixme.ch systemctl start cotisations.timer
+	ssh root@odoo.fixme.ch systemctl list-timers
 
 log:
 	ssh root@odoo.fixme.ch journalctl -u cotisations.service -f

+ 0 - 3
cotisations.service

@@ -6,6 +6,3 @@ Group=daemon
 
 # Environment variables are manually stored in
 # /etc/systemd/system/cotisations.service.d/env.conf
-
-[Install]
-WantedBy=default.target