run script and bug fixing

run script compatibility with macos.
fixed bug where exisiting timers
had not been canceld before recreation