Ok, so this would suffice:
#shut off website...
my $_sleepTime = (60 * 5);
my $_notifyTime = time() + (60 * 60);
my $_maxTime = time() + (60 * 60 * 6);
until($dbh->selectrow_array(qq{select `value` from `pagevars` where `n
+ame` = "eom_process"}) eq "ready") {
$dbh->disconnect();
sleep($_sleepTime);
$dbh = RWC::Sess::connect();
if(time() >= $_notifyTime) {
# Send an email notifying of still not running...
$_notifyTime = time() + (60 * 60);# Reset timer
}
if(time() >= $_maxTime) {
# Send notice of final disconnection and exiting
# to manually fix... send this notice to my cell
# phone to alarm me
# Disconnect from database.... if connected
if($dbh) {
$dbh->disconnect();
}
exit;
}
}
that makes logical sense... so while it is sleeping it does not use any memory right? what if it does take all that time everytime it starts again does it keep building upon the memory it had and then get larger and larger? or does the disconnecting from the database reduce the memory on the fly, even before perl is exited?
thanks again,
Richard
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.