Forums

Scheduling script to run every 10 minutes

Hi, <br> I am new to PythonAnywhere. I have a management command that I want to run every 10 minute. <br> I looked into available options in the "schedule" tab but seems like there's no provision to schedule on minutely period. <Br> So I wrote a loop in my management command to address the need, but now my CPU allowance is being eaten up and I'm put to tarpit because of the loop, even if the script is running after 10 minutes, the wait time (timer.sleep) is using up CPU cycles. <br> Is there any good solution to my concerns?

Are you sleeping in your loop, or actually burning up CPU (by not sleeping)?

Also, maybe - go to Dashboard | Schedule and setup six 'staggered' hourly tasks, e.g. at 0, 10, 20 30, 40 and 50 minutes.

HTH

Jim