Re: Hamster with PHP 4.3 /Apache 2.0
"strikz99" <[email protected]> Mon, 20 Sep 2004 18:11:23 -0000
| Newsgroups | gmane.network.hamster |
|---|---|
| Message-ID | <[email protected]> |
Dave,
Thanks for that info. Led me right to where I wanted to get!
I have another poser for the group, I'm learning the scripting
language used in Hamster, for basic tasks. I've written the below
script which is run when the Outbox is used (SMTP). Basically, it
waits 30s, exchanges email, then for the next 12 mins does an
exchange again every minute. This works fine if a user sends one
email, but if a user sends multiple emails, I get multiple scripts
running.
I'd like to modify it so that if the script is already running, then
it should exit immediatly. I tried to do this with the
surrounding "if(HamIsIdle)" if statement, but it appears that when a
script is in a "sleep" cycle, that it doesn't get counted on the
active job list.
# 30selv2 script
# Wait 30s then execute a send mail (60000 = 1 min)
if (HamIsIdle)
var ($i)
$i=1*30000
#$i=1*1000
print( "30s delay script started...")
sleep($i)
$i=0
while ($i < 12)
$i=$i+1
if (HamIsIdle)
print( "30s delay script Fetching Mail...")
HamMailExchange
endif
sleep 60000
endwhile
else
print( "30s delay script not running... hamster busy")
endif
quit
Thanks,
s.
------------------------ Yahoo! Groups Sponsor --------------------~-->
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/W4wwlB/TM
--------------------------------------------------------------------~->
--
To post a message: [email protected]
To unsubscribe: [email protected]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ehamster/
<*> To unsubscribe from this group, send an email to:
[email protected]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/