I've got my Django site working on Lambda using Zappa. It was very simple. I'm now searching to find out how I set up scheduled Django management commands. From what I've read the work around is to create Python functions that execute the management commands and then schedule the functions to run using the Zappa settings file. Is this still the right method as the help manual doesn't say anything?
Scheduled Django management commands using Zappa & Lamda
446 views Asked by rcx935 At
1
At the time of writing there is an open Zappa issue about this.
symroe came up with this solution which seems to work nicely:
This allows you to specify any Django management command in your
zappa_settings.json
file without further code modifications. That bit looks like this wherezappa_schedule.py
is the name of the file containing the above code andpublish_scheduled_pages()
is a registered management command: