Skip to content

Commit

Permalink
cron: switch user-json/auto-update 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 42e7039 commit 54a9c94
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
11 changes: 11 additions & 0 deletions data/systemd/statink-user-json-auto-update.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unit]
Description=Run stat.ink user-json/auto-update
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 user-json/auto-update
SyslogIdentifier=statink-user-json-auto-update
WorkingDirectory=/var/www/sites/stat.ink/app.dep/current
User=stat.ink
Group=stat.ink
9 changes: 9 additions & 0 deletions data/systemd/statink-user-json-auto-update.timer
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[Unit]
Description=Run stat.ink user-json/auto-update (timer)

[Timer]
# every minutes
OnCalendar=*-*-* *:*:30

[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 @@ -7,5 +7,3 @@
/**
* @var Schedule $schedule
*/

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

This file was deleted.

0 comments on commit 54a9c94

Please sign in to comment.