1.3 KiB
Running FediFetcher as a cron job
Running FediFetcher as a cron job is in many ways the best way of running FediFetcher if you already have a linux device somewhere. This could (but doesn't need to!) be a your mastodon server, or another device (such as a Raspberry Pi).
Tu run FediFetcher as a cron job:
- Clone this repository.
- Install requirements:
pip install -r requirements.txt - Create a
jsonfile with your configuration options. You may wish to store this in the./artifactsdirectory, as that directory is.gitignored - Then simply run this script like so:
python find_posts.py -c=./artifacts/config.json.
If desired, all configuration options can be provided as command line flags, instead of through a JSON file. An example script can be found in the examples folder.
When using a cronjob, we are using file based locking to avoid multiple overlapping executions of the script. The timeout period for the lock can be configured using lock-hours.
Tip
If you are running FediFetcher locally, my recommendation is to run it manually once, before turning on the cron job: The first run will be significantly slower than subsequent runs, and that will help you prevent overlapping during that first run.
For other options of running FediFetcher see the README file.