문제

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