By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,253 Members | 1,333 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,253 IT Pros & Developers. It's quick & easy.

Running a perl script automatically

P: 2
I have a newsletter system and want to have it work automatically. what I have so far works with a visitor to a page with a tiny iframe in it. This iframe calls up the send.pl newsletter script. Trouble is that if the visitor refreshes the page before the script has finished, duplicate emails are sent out. Or if they leave the page before the perl script has finished, not all emails are sent.

When the script is finished, I have it write to a text file with a year and day value so that no more emails will be sent until the next day. I tried writing to this text file at the very start of the script, but if the visitor refreshed the page, not all emails are sent.

What way could I use to have the script carry on doing its thing regardless of what the visitor to the page does. What I want is for the visitor to trigger the perl script within the iframe and that is all that is required. After that the script works away itself in the background, happily sending out the scheduled messages.

Any help greatly appreciated, thanks.
Mar 5 '08 #1
Share this Question
Share on Google+
1 Reply


eWish
Expert 100+
P: 971
It sounds to me like a cron job would be better.

--Kevin
Mar 6 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.