Forums

Scheduling a Django management task

I've written a custom command for Django which I can run with python manage.py my_custom_command

I've got two commands like this. I want one to run daily and the other to run every five hours.

The Schedule tab only gives me the option of running a .py script Hourly. I can always wrap 'python manage command' in a script and tell it to wake up hourly but only run every five hours.

Unless there's a better recommended way to do it?

Hey evilkillerfiggin

I can't think of any better way with the current limitations. Shame the day isn't 25 hours long. Or you could just do if hour % 5; sys.exit(0) as a guard...