Skip to content

Commit

Permalink
cron: switch stat/update-entire-salmon{2,3} to systemd timer
Browse files Browse the repository at this point in the history
  • Loading branch information
fetus-hina committed Nov 21, 2024
1 parent e6e507e commit 42e7039
Show file tree
Hide file tree
Showing 7 changed files with 38 additions and 28 deletions.
11 changes: 11 additions & 0 deletions data/systemd/statink-stats-update-entire-salmon2.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=Run stat.ink stat/update-entire-salmon2
After=paths.target multi-user.target network.target network-online.target NetworkManager.service

[Service]
Type=oneshot
ExecStart=/var/www/sites/stat.ink/app.dep/current/yii stat/update-entire-salmon2
SyslogIdentifier=statink-stats-update-entire-salmon2
WorkingDirectory=/var/www/sites/stat.ink/app.dep/current
User=stat.ink
Group=stat.ink
8 changes: 8 additions & 0 deletions data/systemd/statink-stats-update-entire-salmon2.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Unit]
Description=Run stat.ink stat/update-entire-salmon2 (timer)

[Timer]
OnCalendar=*-*-* 03..21/6:42:00

[Install]
WantedBy=timers.target
11 changes: 11 additions & 0 deletions data/systemd/statink-stats-update-entire-salmon3.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=Run stat.ink stat/update-entire-salmon3
After=paths.target multi-user.target network.target network-online.target NetworkManager.service

[Service]
Type=oneshot
ExecStart=/var/www/sites/stat.ink/app.dep/current/yii stat/update-entire-salmon3
SyslogIdentifier=statink-stats-update-entire-salmon3
WorkingDirectory=/var/www/sites/stat.ink/app.dep/current
User=stat.ink
Group=stat.ink
8 changes: 8 additions & 0 deletions data/systemd/statink-stats-update-entire-salmon3.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[Unit]
Description=Run stat.ink stat/update-entire-salmon3 (timer)

[Timer]
OnCalendar=*-*-* 03..21/6:47:00

[Install]
WantedBy=timers.target
2 changes: 0 additions & 2 deletions schedule/schedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@
* @var Schedule $schedule
*/

require __DIR__ . '/schedule/salmon2.php';
require __DIR__ . '/schedule/salmon3.php';
require __DIR__ . '/schedule/user-json.php';
13 changes: 0 additions & 13 deletions schedule/schedule/salmon2.php

This file was deleted.

13 changes: 0 additions & 13 deletions schedule/schedule/salmon3.php

This file was deleted.

0 comments on commit 42e7039

Please sign in to comment.