-
Notifications
You must be signed in to change notification settings - Fork 239
Running FediFetcher as a Scheduled Task in Windows
Running FediFetcher as a Scheduled Task in Windows is an option if you are a Windows User and your main device is (almost) always running.
FediFetcher requires Python 3 to run, and pip
to manage dependencies. If you already have these installed, you should skip this section.
The best way to install Python on Windows is by downloading the official Python installer from the Python website at https://www.python.org/downloads/
After the Python installer file has finished downloading, launch it by double-clicking on it in order to begin the installation. Be sure to select, make sure the "Add python.exe to PATH".
Once install is finished, open the Windows Command Prompt by launching cmd.exe
, type pip
and hit Return. You should get the generic PIP help dialogs. If it shows an error, go through install processes again and make sure you choose to in Add Python to Path.
It is recommended to install FedFetcher using Git. This simplifies updating to the latest version.
This guide assumes you are installing FediFetcher at C:\FediFetcher
. If you install it elsewhere, you need to adjust your paths throughout this document.
- Install Git for Windows, if you don't already have it installed.
- Open the Windows Command prompt to
C:\
- Download FediFetcher:
git clone https://github.com/nanos/FediFetcher
- Change into the FediFetcher directory:
cd FediFetcher
- Install depdendencies:
pip install -r requirements.txt
- Get your Access Token, if you haven't already done so.
- Create your configuration file at
C:\FediFetcher\artifacts\config.json
- Paste your desired configuration options
It's best to run FediFetcher once before you set it up on a schedule:
.\find_posts.py -c=./artifacts/config.json
Make sure everything is working, and you don't encounter any errors. This first run may take several hours to complete, so be patient.
- Open Task Scheduler by pressing the Windows key, typing 'Task Scheduler', and pressing Enter.
- On the far right, choose 'Create basic task.'
- Choose a name (e.g. FediFetcher), and optionally, enter a description so down the road you know what the task is about. Click next
- For trigger choose 'When the Computer Starts.' Click Next.
- Now, choose the Action. Select 'Start a Program.' Click Next.
- In the Program/script box, put
C:\FediFetcher\find_posts.py
. Now add arguments.c=./artifacts/config.json
. It's important to start inC:\FediFetcher
. Now click Next.
- On the final screen double check your command, and be sure to tick "Open the properties dialog" as we need to set how often FediFetcher will run. Click 'Finish'.
- On the 'Triggers' tab, select 'At Startup' and 'Edit'.
- Tick 'Repeat Task Every' and select your frequency (e.g. every 15 minutes). Change duration to 'Indefinitely'. Click 'OK'.
FediFetcher is now set up to run as a Scheduled Task. You can right click the task to run it now or the next time you restart your computer, it will be set to run on a schedule.
It's important to stay up to with FediFetcher so you always get the latest features and bugfixes.
Please refer to the Updating FediFetcher documentation for more information.
Fork it and send a pull request. Read Contributing to FediFetcher for more info.