NotificationFunction

NotificationFunction

is an option that specifies how notifications should be sent from asynchronous tasks.

Details

  • Possible settings for NotificationFunction include:
  • Nonesend no notifications
    Automaticsend email notification to the owner on failure
    Allsend email notification to the owner on success or failure
    "chan"Automaticnotify the owner on failure through the specified channel
    "chan"Allnotify the owner on success or failure through the channel
    {user1,user2,}send email on failure to the specified users
    {{user1,}cond,}send email to the specified users on condition cond
    fapply an arbitrary function
  • With NotificationFunction->f, the function f is applied to an association containing the following elements:
  • "Recipients"users to be notified
    "Result"result from the task
    "TaskLink"link to the task object
    "TaskCloudObject"cloud object for the task
    "TaskFilename"file name for the task (None if unnamed)
    "LogLink"link to the log from running the task
    "StartTime"start time of the task
    "EndTime"end time of the task
    "Timing"CPU time used for the task
    "AbsoluteTiming"wall-clock time used for the task
    "NextRunTime"time of the next scheduled run
    "RemainingRuns"number of remaining runs specified

Examples

Basic Examples  (1)

Deploy a task that notifies multiple parties on any outcome:

In[1]:=
Click for copyable input
Out[1]=

Trigger the task to run asynchronously:

In[2]:=
Click for copyable input
Out[2]=

Redeploy the task to notify on failure only:

In[3]:=
Click for copyable input
Out[3]=

Trigger the task to run again:

In[4]:=
Click for copyable input
Out[4]=

Redeploy the task with a custom notification function:

In[5]:=
Click for copyable input
Out[5]=

Trigger the task to run again:

In[6]:=
Click for copyable input
Out[6]=

Delete the task:

In[7]:=
Click for copyable input
Out[7]=

See Also

DeliveryFunction  ScheduledTask  DocumentGenerator  SendMessage  SendMail

Introduced in 2015
(10.1)