I need a simple counter to send every 30 Sec. emails (dosendmail) from a database query (dostartreading).
The think is: After 30 Sec. the counter is over and it will not repeat .
![Rolling Eyes :roll:](./images/smilies/icon_rolleyes.gif)
Any ideas how to repeat the counter, if currentTimerValue = 0 ?
Thanks
Stef
on declare_timer
global pTime
put 30 into pTime
put pTime into fld "fldCount"
countDownTimer pTime
end declare_timer
on countDownTimer currentTimerValue
subtract 1 from currentTimerValue
put currentTimerValue into fld "fldCount"
if currentTimerValue > 0 then
send "countDownTimer" && currentTimerValue to me in 1 sec
end if
if currentTimerValue = 0 then
dostartreading
global tRecords, tRecords2
put tRecords into field "Data"
dosendmail
end if
end countDownTimer