Added option to control when the user is notified, as requested by @camporez