miniflux-legacy/docs/cronjob.markdown

44 lines
1.6 KiB
Markdown
Raw Permalink Normal View History

2016-12-27 00:01:46 +01:00
Background Job (cronjob)
========================
2014-10-31 03:10:59 +01:00
The cronjob is a background task to update your feeds automatically.
2016-12-27 00:01:46 +01:00
Command line usage
------------------
2014-10-31 03:10:59 +01:00
Technically, you just need to be inside the directory `miniflux` and run the script `cronjob.php`.
Parameters | Type | Value
--------------------|--------------------------------|-----------------------------
--limit | optional | number of feeds
--call-interval | optional, excluded by --limit, require --update-interval | time in minutes < update interval time
--update-interval | optional, excluded by --limit, require --call-interval | time in minutes >= call interval time
Examples:
2014-10-31 03:10:59 +01:00
```bash
crontab -e
2014-10-31 03:10:59 +01:00
# Update all feeds every 4 hours
0 */4 * * * cd /path/to/miniflux && php cronjob.php >/dev/null 2>&1
2014-10-31 03:10:59 +01:00
# Update the 10 oldest feeds each time
0 */4 * * * cd /path/to/miniflux && php cronjob.php --limit=10 >/dev/null 2>&1
2014-10-31 03:10:59 +01:00
# Update all feeds in 60 minutes (updates the 8 oldest feeds each time with a total of 120 feeds).
* */4 * * * cd /path/to/miniflux && php cronjob.php --call-interval=4 --update-interval=60 >/dev/null 2>&1
```
2016-12-27 00:01:46 +01:00
Web usage
---------
The cronjob script can also be called from the web, in this case specify the options as GET variables.
Example: <http://yourpersonalserver/miniflux/cronjob.php?call-interval=4&update-interval=60&token=XXX>
2016-12-27 00:01:46 +01:00
- The cronjob URL is visible on the page **preferences > about**.
- The access is protected by a private token.
- You can disable the web cronjob by changing the config parameter `ENABLE_CRONJOB_HTTP_ACCESS` to `false`.