<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; " class=""><div class="" style="">Nitin,</div><div class="" style=""><br class="" style=""></div><div class="" style=""><a href="http://us2.php.net/manual/en/function.ini-get.php">http://us2.php.net/manual/en/function.ini-get.php</a> will let you get the php setting, though there may be better ways of handling this.</div><div class="" style=""><br></div><div class="" style="">The cron semaphore is just to make sure more than one instance of the cron isn't running at once (a signaling system).</div><div class="" style=""><br></div><div class="" style="">- Ken Winters</div><div class="" style=""><br class="" style=""></div><br class="" style=""><div style=""><div class="" style="">On Sep 18, 2009, at 1:16 PM, nitin gupta wrote:</div><br class="Apple-interchange-newline" style=""><blockquote type="cite">Hello,<div class="" style=""><br class="" style=""></div><div class="" style="">I am maintaining the module feedapi imagegrabber, which pulls the images from the original url of the feed items (just like google reader). It is implemented on the top of feedapi and hence implements the feedapi_after_refresh() hook, which is basically fired by the feedapi after it has refreshed the feed.</div> <div class="" style=""><br class="" style=""></div><div class="" style="">Now, as my module download images from an external website, I can never be sure about the time it will take to complete the job of downloading images for all the feed items. Therefore, sometimes I get a 'fatal execution time exceeded error'. How can I know how much execution time is left, so that I can return on time by saving the rest of the work as a cron job?</div> <div class="" style=""><br class="" style=""></div><div class="" style="">I have gone through the source code of FeedAPI which implements hook_cron(). It uses a variable called 'cron_semaphore', which I am guessing is some way to share execution time but am unable to get how. I will really appreciate if someone can explain the above to me or provide some tutorial links on writing a good hook_cron implementation.</div> <div class="" style=""><br class="" style=""></div><div class="" style="">--<br class="" style="">Regards,<br class="" style="">Nitin Kumar Gupta<br class="" style=""><a href="http://publicmind.in/blog/">http://publicmind.in/blog/</a><br class="" style=""> </div></blockquote></div><br class="" style=""></body></html>