Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Time taken by external task
infoForDj
Hi,
I have an external task that calls a perl script that takes care of sending email notifications. This script is not iw_send_mail or iwservlet_mail. Now, the mails usually arrive 2 min after the task has become active. However if I call this script from within a cgi script, the mail arrives instantly.
Please help me to understand the cause of above mentioned inconsistency and solve it.
Thanks,
Dhruv
Find more posts tagged with
Comments
Adam Stoller
Without seeing the script, and potentially wft, and spending [un-paid-for] time debugging it - it's kind of difficult to figure out what's happening and why.
It sounds like you have a separate script for sending email - which is called from both an externaltask script and cgitask script - but is not, in fact, the entire externaltask or cgitask script -- i.e. you have externaltask script A and cgitask script B - both of which call your email script C -- is that correct?
If so - then perhaps it has more to do with how scripts A and B are written than with how C is written.
If not - then you may need to provide a LOT more details before anyone can really try to assist you.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com
infoForDj
Hi,
I have an external task which calls script C and a CGI task which calls script B which in turn calls script C. But the time taken by the script C to execute is much longer when it is called from the external task than when called from the cgi script B.
Thanks,
Dhruv
Adam Stoller
The only thing I can think of off-hand would be to add time-stamped debugging statements to both scripts B and C - so that you can corroborate the experience with actual data. I'd probably have something that prints out a timestamp (with descriptive text) at the beginning and end (or just prior to callback) of both scripts and have it log [append] to a single file and then look at that file to see if it validates script C taking longer to run when executed as an externaltask script as oppsed to being executed as a cgitask script.
If that doesn't correlate - then I'd try adding additional debugging statements directly around the location in script C where the mail is actually being composed and sent - and again look for corroborating evidence, and so-on, and so-forth - if all the timestamp evidence doesn't uncover a difference in processing time of the scripts, but you still seem to have a difference in timing with respect to receiving the email - then the problem shifts to trying to debug your email servers - and that's a bit out of scope.
--fish
Senior Consultant, Quotient Inc.
http://www.quotient-inc.com