Quantcast
Channel: MyBB Community Forums - Tutorials
Viewing all articles
Browse latest Browse all 690

Enable Systemd Timers to Handle MyBB Task System

$
0
0
Create the following two files in your /etc/systemd/system/ directory:

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

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

/etc/systemd/system/mybb.timer
Code:
[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:
Code:
systemctl daemon-reload
systemctl enable mybb.timer
systemctl start mybb.timer

Viewing all articles
Browse latest Browse all 690

Trending Articles