This seems like a very unusual thing to do. CGI scripts are meant to be running under a web server. Why are you scheduling it? Perhaps you want to re-write this as a true scheduled script and set up a cron job for it?open(AT, "|at now + 2 minutes") or die "..."; print AT "/....../mifuture.cgi idnumber=220\n"; close(AT) or die "..."; # non-zero exit status
A better solution might be to queue up your requests and send them at intervals, assuming it's the instant batch you're trying to avoid:
I'm curious why you are trying to avoid sending out two mailings at once...? I can't imagine a case where the mail server might have problems with it.fork && exit; # CGI script returns/exits right then # This continues processing in the background while ($_ = shift(@things_to_do)) { sleep $seconds; process($_); }
In reply to Re: Unix batch from perl?
by Fastolfe
in thread Unix batch from perl?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |