The main handler for regular use in AppleScript is the downtime handler.
on idle
display dialog "Go back to work" buttons "Work Harder" default button "Work Harder"
return 3600
end idle
This script will pop up a dialog box when the application starts, and then every 3600 seconds after clicking the button. Regardless of the number returned by the idle handler, the number of seconds until the next unoccupied event is triggered will be indicated.
, , , , idle script , , 60, , .
on idle
if the minutes of the (current date) is 30 then
display dialog "Go back to work" buttons "Work Harder" default button "Work Harder"
end if
return 60
end idle
. ( Unix, AppleScripts .)
AppleScript "" " ", , . " " "", .