alarm calculated and triggered in the background