質問

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