I want to run a Python script every so many minutes. The script starts by fetching the newest article from a rss-feed (using feedparser). What I want, is when the newest article is the same as the last time it ran, the script just ends. How do I accomplish this?
You could store the state in a temporary file. E.g. write the title into a temporary file if there isn't a temporary file already, and next time read from the file and compare the read title with the new title.
Do nothing if RSS feed hasn't changed