Verified Commit 2812c082 authored by Giancarlo Razzolini's avatar Giancarlo Razzolini
Browse files

Add the services and timers

Create service/timers for the runJobs and pruneCache maintenance commands. The runJobs
runs every 5 minutes and the pruneCache every day at 04:12 AM. Also add a new service
that runs the runJobs with the --wait parameter.
parent 5171ebbb
[Unit]
Description=Archwiki Prune Cache Service
[Service]
Type=oneshot
User={{ archwiki_user }}
WorkingDirectory={{ archwiki_dir }}
ExecStart=/usr/bin/php {{ archwiki_dir }}/public/maintenance/pruneFileCache.php -q --agedays 1
[Install]
WantedBy=multi-user.target
[Unit]
Description=Archwiki runJobs timer
[Timer]
OnCalendar=*-*-* 04:12:00
[Install]
WantedBy=timers.target
[Unit]
Description=Archwiki runJobs Wait Service
[Service]
User={{ archwiki_user }}
WorkingDirectory={{ archwiki_dir }}
ExecStart=/usr/bin/php {{ archwiki_dir }}/public/maintenance/runJobs.php -q --wait
Restart=on-failure
[Install]
WantedBy=multi-user.target
[Unit]
Description=Archwiki runJobs Service
[Service]
Type=oneshot
User={{ archwiki_user }}
WorkingDirectory={{ archwiki_dir }}
ExecStart=/usr/bin/php {{ archwiki_dir }}/public/maintenance/runJobs.php -q
[Install]
WantedBy=multi-user.target
[Unit]
Description=Archwiki runJobs timer
[Timer]
OnUnitActiveSec=5min
OnBootSec=5min
RandomizedDelaySec=1min
[Install]
WantedBy=timers.target
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment