[For 1.8] Enable Systemd Timers to Handle MyBB Task System
#1
Create the following two files in your /etc/systemd/system/ directory:

/etc/systemd/system/mybb.service
[Unit]
Description=MyBB Tasks

[Service]
User=www-data
ExecStart=/usr/bin/php /var/www/mybb/task.php

/etc/systemd/system/mybb.timer
[Unit]
Description=Runs MyBB tasks every minute

[Timer]
OnBootSec=5min
OnUnitActiveSec=1min
Unit=mybb.service

[Install]
WantedBy=multi-user.target

Now, run the following commands in your terminal:
systemctl daemon-reload
systemctl enable mybb.timer
systemctl start mybb.timer
Reply


Messages In This Thread
Enable Systemd Timers to Handle MyBB Task System - by kawaii - 2017-06-17, 10:17 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)