Spaces:
Running
Running
|
Download docs/scheduler_setup.md from AnayShukla/fpl-solver: direct link, hf CLI and curl.
- Browser
- Download file 2.61 kB
-
https://huggingface.co/spaces/AnayShukla/fpl-solver/resolve/main/docs/scheduler_setup.md
- Command line
-
hf download hf://spaces/AnayShukla/fpl-solver/docs/scheduler_setup.md
-
curl -L -o scheduler_setup.md https://huggingface.co/spaces/AnayShukla/fpl-solver/resolve/main/docs/scheduler_setup.md
2.61 kB
Windows Task Scheduler
Two tasks:
| Task | Runs | Command |
|---|---|---|
FPL xMins Refresh |
every 3 hours | run_auto.py --xmins-only β Solio β Supabase, ~1 min |
FPL Auto Update |
every 2 days, 12:00 | run_auto.py β everything, ~25 min |
They share a lock (logs/run_auto.lock), so they never open the Solio Chrome
profile at the same time. The deployed app re-reads admin_xmins from Supabase
every 15 minutes (XMINS_POLL_SECONDS in main.py), so a new write shows up
without a restart.
Both should have, under Conditions/Settings: start on battery, don't stop when going on battery, wake the computer to run, run as soon as possible after a missed start. The tasks run while you are signed in (locked screen and sleep are fine). Running them while signed out needs "Run whether user is logged on or not", which needs an admin prompt.
Original setup (full pipeline)
One-time setup
- Press Win+R, type
taskschd.msc, Enter. - Right pane β Create Basic Taskβ¦
- Name:
FPL Auto Update. Description:Runs xMins pipeline every 3 days. - Trigger: Daily, start today at (say) 09:00, Recur every 3 days.
- Action: Start a program.
- Program/script:
C:\Users\anays\Desktop\python-repos\projections\.venv\Scripts\python.exe - Add arguments:
run_auto.py - Start in:
C:\Users\anays\Desktop\python-repos\projections
- Program/script:
- Finish. Then right-click the new task β Properties β
- General tab: check Run whether user is logged on or not (so it fires even when the laptop is asleep-and-woken).
- Conditions tab: uncheck Start the task only if the computer is on AC power if you want it to run on battery too.
- Settings tab: check Run task as soon as possible after a scheduled start is missed (for when the laptop was off at scheduled time).
Verifying
- Right-click the task β Run. Then check
logs/run_auto_YYYYMMDD.login the repo β should end withrun_auto DONEor a clear error. - Exit codes surface in Task Scheduler's History tab:
0= success2= Solio session expired β runpython solio_scraper.py --login3= Solio scrape/parse failed β inspect logs, DOM may have changed4= Supabase write failed β check project status, network
When Solio session dies (~monthly)
The scheduler will log exit code 2 and stop writing until you:
.venv\Scripts\python.exe solio_scraper.py --login
Sign in with your Google account, hit ENTER, done. Next scheduled run picks up.