Skip to main content

set_event

Function set_event 

Source
pub async fn set_event(template: EventTemplate, pool: &SqlitePool) -> Result<()>
Expand description

Create a delayed, recurring or direct notification.

§Parameters

  • template: Structure that defines a new event
  • pool: Optional instance of a Sqlite database pool

§Errors

Possible errors are:

  • an invalid connection to the database
  • unable to access the sound output device
  • An invalid input date, which is either not in the format of YYYY-mm-ddTHH:MM or smaller than now
  • An invalid duration value for the --wait argument
  • An incorrect cron string