Wednesday, March 16, 2016

scheduling tasks on PythonAnywhere to run on your schedule

a note from PythonAnywhere

Tick tock tick tock tick tock. It's the passage of time -- so familiar and yet, so mysterious; there's no good explanation for it in Physics! Will we ever truly understand it? Who knows...
But one thing's for sure, and that's the fact that you can HARNESS THE POWER OF TIME using PythonAnywhere Scheduled Tasks. Something we see you haven't had time to do yet, ho ho.[1]
So head on over to the Schedule tab where you'll be able to set any Python script (or, indeed, any other kind of script) to run on a regular basis
Free users can set tasks to run once a day, paying users can schedule hourly tasks
Here's a few ideas to get you started
  • Send yourself an email once a day reminding you to floss your teeth
  • Write a script to scrape daily prices 3D-printed plastic models of classic designs for fire hydrants. Finally you'll be able to make those crucial buying decisions at the best time!
  • Write a twitter bot that posts the time of day once a day, and helpfully @-mentions random people informing them of what time it is
  • Download all the books on project gutenberg that were written on that day in history, and compute a hash of their text contents, just because!
Incidentally, using a scheduled task can also be a good way to have a long-running task that restarts automatically if it crashes, for things like async workers, celery and so on. More info on this help page about long-running tasks.
The possibilities are endless.
[1]The original author of this email was already on their final warning for bad puns, and has now been summarily dismissed.
Happy Scheduling!
Glenn + the PythonAnywhere team.
Glenn Jones
Developer
PS These emails are designed to help you get the most out of PythonAnywhere, including pointing you towards some cool features that are a bit hidden. We'll only send out one a week, but if you want to, you can unsubscribe here.
PythonAnywhere: Develop and host Python from your browser
http://www.pythonanywhere.com/

A product from PythonAnywhere LLP
17a Clerkenwell Road, London EC1M 5RD, UK
VAT No.: GB 893 5643 79
Registered in England and Wales as company number OC378414.
Registered address: 28 Ely Place, 3rd Floor, London EC1N 6TD, UK

No comments:

Post a Comment