A local LLM is most useful when you give it one boring job and let it run without you. This guide builds one: a script that reads the headlines from RSS feeds you choose, asks a small Ollama model for a five-bullet briefing, and sends it to your phone every morning. The model runs on your own computer, and the whole thing needs about 60 lines of Python.
Who this is for and what you will have
This is for professionals, students and small-business owners who already run (or are willing to install) Ollama on a laptop, desktop or home server and want something practical from it besides chat. At the end you will have:
- A Python script that gathers headlines and calls the Ollama API.
- A schedule that runs it every day (cron on Linux or macOS, Task Scheduler on Windows).
- A push notification on your phone through ntfy, or a text file if you prefer.
- A way to see why a run failed.
The machine must be on, and awake, at the scheduled time. A laptop that is asleep at 7:30 will not run the job.
How the pieces fit
cron / Task Scheduler
|
v
briefing.py --fetch--> RSS feeds (internet)
|
v
Ollama http://localhost:11434/api/generate (local model)
|
v
briefing text --> ntfy push (internet) or a local fileOnly the middle step is local. Feeds and the push service are online, which matters for the privacy section below.
Prerequisites
- Ollama installed and running. The Ollama FAQ says it binds
127.0.0.1port11434by default, so the script can reach it athttp://localhost:11434. - A small model pulled. On Ollama's library page for Llama 3.2, the
llama3.2:3btag is listed at 2.0GB, andllama3.2:1bat 1.3GB. Pick the 3b model first; drop to 1b only if the machine is short on memory. If you are unsure whether your hardware can run a model, read CPU vs GPU vs TPU vs NPU explained. - Python 3 (the script below uses only the standard library, so no
pip install).
Pull the model:
ollama pull llama3.2:3bStep 1: Test the Ollama API by hand
Before writing any script, confirm the endpoint works. Ollama's API reference documents POST /api/generate with model required, and stream defaulting to true. Setting stream to false returns a single JSON object, which is easier for a script.
curl http://localhost:11434/api/generate -d '{
"model": "llama3.2:3b",
"prompt": "Say hello in five words.",
"stream": false
}'The reply is JSON. The generated text is in the response field, and done is true when generation has finished. The API reference also lists total_duration and load_duration in nanoseconds, which are useful later for timing.
Step 2: Write the briefing script
Save this as briefing.py. It reads the <title> of each <item> in an RSS 2.0 feed, builds a prompt, and prints the model's answer.
import json
import sys
import urllib.request
import xml.etree.ElementTree as ET
FEEDS = ["https://example.com/feed.xml"]
OLLAMA = "http://localhost:11434/api/generate"
MODEL = "llama3.2:3b"
PER_FEED = 8
def headlines(url):
with urllib.request.urlopen(url, timeout=20) as r:
root = ET.fromstring(r.read())
out = []
for item in root.iter("item"):
t = (item.findtext("title") or "").strip()
if t:
out.append(t)
return out[:PER_FEED]
def main():
lines = []
for url in FEEDS:
try:
lines += ["- " + h for h in headlines(url)]
except Exception as e:
print("feed failed:", url, e, file=sys.stderr)
if not lines:
sys.exit("no input, nothing to summarize")
prompt = (
"Write a morning briefing of at most 5 bullet points from these headlines. "
"Use only the text below. Do not add facts.\n\n" + "\n".join(lines)
)
body = json.dumps({
"model": MODEL,
"prompt": prompt,
"stream": False,
"options": {"num_ctx": 4096, "temperature": 0.2},
"keep_alive": 0,
}).encode()
req = urllib.request.Request(OLLAMA, body, {"Content-Type": "application/json"})
with urllib.request.urlopen(req, timeout=300) as r:
print(json.load(r)["response"].strip())
if __name__ == "__main__":
main()Replace the FEEDS list with real feed URLs. Atom feeds use <entry> instead of <item>, so this simple parser reads RSS 2.0 only.
Why these settings
| Setting | Value | Reason |
|---|---|---|
stream | false | One JSON object back, no chunk handling |
options.num_ctx | 4096 | Ollama's FAQ says the default context window is 4096 tokens; setting it explicitly documents the limit |
options.temperature | 0.2 | Lower randomness for a factual summary |
keep_alive | 0 | The API reference says 0 unloads the model immediately, which frees memory after a once-a-day job |
PER_FEED | 8 | Keeps the prompt well inside the context window |
If you feed in more text than the context window holds, the model cannot use all of it. Keep the list short rather than raising num_ctx first, because a larger window uses more memory.
A prompt that behaves
Small models invent details when the instruction is loose. Three habits help: say "use only the text below", cap the output ("at most 5 bullet points"), and keep the input to titles rather than full articles. If a headline needs context, add the feed's <description> for that item only, and trim it.
Step 3: Deliver the result
Option A: a push notification with ntfy
ntfy publishes a message with a plain HTTP request. Its documentation shows the simplest form:
curl -d "Backup successful" ntfy.sh/mytopicIt also documents the Title and Priority headers. To send the briefing, pipe the script's output in:
python3 briefing.py | curl -H "Title: Morning briefing" -d @- ntfy.sh/your-long-random-topicThe -d @- form tells curl to read the body from standard input. Install the ntfy app on your phone and subscribe to the same topic name.
Important: the ntfy docs say that because there is no sign-up, the topic is essentially a password, so pick one that is not easily guessable. Anyone who knows the topic name can read and publish to it. Do not send anything sensitive through a public topic, and do not use a topic name like morning.
Option B: a local file
If you would rather not use any third-party service, write the output to a dated file and read it with your coffee:
python3 briefing.py > ~/briefings/$(date +%F).txtCreate the briefings folder first. This keeps the entire output path on your own machine.
Step 4: Schedule it
Linux and macOS with cron
The crontab manual page documents five time fields: minute (0-59), hour (0-23), day of month (1-31), month (1-12) and day of week (0-7), followed by the command. Open your crontab with crontab -e and add a line for 7:30 every day:
30 7 * * * python3 /home/you/briefing/briefing.py > /home/you/briefings/latest.txt 2>> /home/you/briefing/error.logUse full paths, because cron starts commands with its own small environment. The man page says it sets SHELL to /bin/sh and takes HOME and LOGNAME from the crontab owner's passwd entry, so do not rely on anything from your login shell.
Windows with Task Scheduler
Microsoft documents schtasks /Create with /SC for the schedule, /TN for the task name, /TR for the program to run and /ST for the start time in 24-hour HH:mm format. A daily 7:30 task looks like this:
schtasks /Create /SC DAILY /ST 07:30 /TN "MorningBriefing" /TR "C:\briefing\run.cmd"Put the real command in run.cmd so you can handle quoting and redirection there:
python C:\briefing\briefing.py > C:\briefing\latest.txt 2>> C:\briefing\error.logRun it once on demand to test, using the documented /Run form:
schtasks /Run /TN "MorningBriefing"Microsoft's reference documents /RU to choose the account the task runs under, /IT to run only while that user is logged on, and /NP to store no password, in which case only local resources are available. Because this job calls the network for feeds, test that the account you choose can reach them.
Step 5: Verify
- Run the script by hand and read the output. Confirm every bullet comes from a headline you gave it.
- Run it from the scheduler once (
schtasks /Runon Windows, or temporarily set cron to the next minute). - Check that the file or the phone notification arrived.
- Check Ollama's logs if something looks wrong. The Ollama troubleshooting page gives the locations: on Linux with systemd,
journalctl -u ollama --no-pager --follow --pager-end; on macOS,cat ~/.ollama/logs/server.log; on Windows, open%LOCALAPPDATA%\Ollama, where the newest log isserver.log.
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
Connection refused on port 11434 | Ollama is not running | Start Ollama, or on Linux check the systemd service |
Script prints no input, nothing to summarize | Every feed failed or has no <item> | Read error.log, open the feed URL in a browser, check whether it is Atom |
| Briefing contains facts not in your headlines | Small model drifting | Shorten the list, lower temperature, repeat "use only the text below" |
| Works by hand, fails from the scheduler | Different environment or working directory | Use absolute paths to Python, the script and the logs |
| Job never fires | Machine asleep or task needs a logged-in user | Keep the machine awake at that time; review the task's run-as settings |
| Model is slow on first request | Model must load into memory | Normal for a once-a-day job; the model stays loaded 5 minutes by default, and keep_alive changes this |
Privacy: what is and is not local
Running the model locally means your prompt is not sent to a hosted AI provider. That is the real gain, and it matters most when the input is private, such as your calendar or email subjects.
It is not an end-to-end private pipeline. Fetching an RSS feed reveals your IP address to the feed host. A push through ntfy sends the briefing text to the ntfy server (unless you self-host it). If you add calendar or email inputs later, the fetch step talks to Google or Microsoft, and you should use the narrowest read-only permission the API offers.
Fetched text is also untrusted. A malicious feed item could contain instructions aimed at the model. This job can only print text, so the risk is a misleading summary rather than an action, which is a good reason to keep the job read-only. For the wider picture, see the LLM prompt injection defense checklist.
Five more one-job ideas
Each reuses the same pattern: collect text, one fixed prompt, one output.
- Server log digest: summarize yesterday's warning and error lines from one log file.
- Meeting prep: turn today's calendar titles into a one-line reminder for each.
- RSS research digest: group a week of headlines on one topic you follow.
- Inbox subject triage: list which subjects look like they need a reply, read-only.
- Receipts to CSV: extract date, vendor and amount from text receipts, then check the numbers yourself.
If you prefer a visual workflow tool over a script, the same idea can run in a self-hosted n8n instance, covered in n8n self-host with Docker.
Closing checklist
- Ollama runs and
curlto/api/generatereturns aresponse. - The script uses
stream: false, an explicitnum_ctxand a short input list. - The output goes to a local file or a hard-to-guess ntfy topic.
- The scheduler uses absolute paths and logs errors to a file.
- You read the first few briefings against the source headlines.
What we checked
- Opened the Ollama
/api/generatereference on docs.ollama.com on 2026-11-30:modelis required,streamdefaults totrue,optionsincludesnum_ctxandtemperature,keep_aliveaccepts a duration or0to unload at once, and the response hasresponse,done,total_durationandload_duration. - Opened the Ollama FAQ on 2026-11-30: the default context window is 4096 tokens, Ollama binds 127.0.0.1 port 11434 by default, and models stay in memory 5 minutes by default.
- Opened the Ollama troubleshooting page on 2026-11-30 and copied the three log locations (journalctl, macOS server.log,
%LOCALAPPDATA%\Ollama). - Opened the Llama 3.2 page on ollama.com on 2026-11-30: tags
llama3.2:3bat 2.0GB andllama3.2:1bat 1.3GB. - Opened the ntfy publishing docs on 2026-11-30 (first 100,000 characters of the page): the
curl -dexample, theTitleandPriorityheaders, and the note that a topic is essentially a password. - Opened the Microsoft schtasks reference (page last updated 2024-06-13 per its metadata) and the crontab(5) man page on 2026-11-30 and compared the options and field order shown above.
- Not checked hands-on: the script, the scheduler entries and the ntfy commands were not run on a live machine, and no model output was generated. The code follows the documentation above; run it yourself and read the first outputs before relying on them.
Last tested: 2026-11-30
References
- Ollama API, generate a response: https://docs.ollama.com/api/generate
- Ollama FAQ: https://docs.ollama.com/faq
- Ollama troubleshooting: https://docs.ollama.com/troubleshooting
- Llama 3.2 on Ollama: https://ollama.com/library/llama3.2
- ntfy, publishing: https://docs.ntfy.sh/publish/
- Microsoft, schtasks: https://learn.microsoft.com/en-us/windows/win32/taskschd/schtasks
- crontab(5) manual page: https://man7.org/linux/man-pages/man5/crontab.5.html
Comments
Questions and tips are welcome. Comments are checked by the EpiFive team before they appear; please do not share passwords, phone numbers or other private details.