diff --git a/data/systemd/statink-user-json-auto-update.service b/data/systemd/statink-user-json-auto-update.service new file mode 100644 index 000000000..351407843 --- /dev/null +++ b/data/systemd/statink-user-json-auto-update.service @@ -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 diff --git a/data/systemd/statink-user-json-auto-update.timer b/data/systemd/statink-user-json-auto-update.timer new file mode 100644 index 000000000..da67b63d4 --- /dev/null +++ b/data/systemd/statink-user-json-auto-update.timer @@ -0,0 +1,9 @@ +[Unit] +Description=Run stat.ink user-json/auto-update (timer) + +[Timer] +# every minutes +OnCalendar=*-*-* *:*:30 + +[Install] +WantedBy=timers.target diff --git a/schedule/schedule.php b/schedule/schedule.php index 63f758e4b..49bb48a64 100644 --- a/schedule/schedule.php +++ b/schedule/schedule.php @@ -7,5 +7,3 @@ /** * @var Schedule $schedule */ - -require __DIR__ . '/schedule/user-json.php'; diff --git a/schedule/schedule/user-json.php b/schedule/schedule/user-json.php deleted file mode 100644 index c1e240a6a..000000000 --- a/schedule/schedule/user-json.php +++ /dev/null @@ -1,13 +0,0 @@ -command('user-json/auto-update') - ->cron('* * * * *');