a snippet code for scheduling a notification