سؤال

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?

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top