Table of Contents
In normal operation The Arsse is expected to regularly check whether newsfeeds might have new articles, then fetch them and process them to present new or updated articles to clients. This can be achieved either by having The Arsse operate a persistent background process (termed a daemon or service), or by using an external scheduler to periodically perform single checks. Normally a daemon is preferred.
There are many ways to administer daemons, and many schedulers can be used. This section outlines a few, but many other arrangements are possible.
As a daemon via systemd
The Arsse includes a sample systemd service unit file which can be used to quickly get a daemon running with the following procedure:
# Copy the service unit sudo cp "/usr/share/arsse/dist/arsse.service" "/etc/systemd/system" # Modify the unit file if needed sudoedit "/etc/systemd/system/arsse.service" # Enable and start the service sudo systemctl enable --now arsse
The Arsse's feed updater can then be manipulated as with any other service. Consult the
systemctl manual for details.
As a cron job
Keeping newsfeeds updated with cron is not difficult. Simply run the following command:
sudo crontab -u www-data -e
And add a line such as this one:
*/2 * * * * /usr/bin/env php /usr/share/arsse/arsse.php refresh-all
Appendix: how often newsfeeds are fetched
Though by default The Arsse will wake up every two minutes, newsfeeds are not actually downloaded so frequently. Instead, each newsfeed is assigned a time at which it should next be fetched, and once that time is reached a conditional request is made. The interval between requests for a particular newsfeed can vary from 15 minutes to 24 hours based on multiple factors such as:
- The length of time since the newsfeed last changed
- The interval between publishing of articles in the newsfeed
- Whether the last fetch or last several fetches resulted in error
As a general rule, newsfeeds which change frequently are checked frequently, and those which change seldom are fetched at most daily.