Pregunta

I have cgi script that sends out an email; occasionally the email server is busy and the email doesn't get sent.

As part of the except clause of an emailing try construct, I'd it to try again in, say, 10 minutes or so. How would I schedule the resend() function to only fire once? Do I have to remove the job whilst in the resend() function?

¿Fue útil?

Solución

See Scheduler.add_date_job(). Use something like datetime.now() + timedelta(minutes=10) when scheduling.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top