Add scheduled event function.