swif2 notify

Configure notifications for a workflow.

Usage

swif2 notify <workflow> [-clear] [-email <address>] -when <condition>

Request that swif send an email to <address> when the specified <condition> holds. This command may be called multiple times with different email addresses and/or conditions to configure multiple recipients/situations for notification. Specifying -clear will cause any previously configured notification for <address> and <condition> to be removed. Note that a subsequent call with the same address and condition will reset the disposition of the previous notification request. This means that if the condition was already true, and a notification sent, a new notification will be sent if/when that condition holds again (including if it remains true).

Supported conditions are done and stalled. The former becomes true when all jobs have either finished or been abandoned. The latter is true when the number of errors prevents any further work until they are resolved.

Arguments

Flag Value Comment
-when done,stalled Specify the condition under which a notification should be sent.
-email user@domain Specify the email address to which notification should be sent.
-clear Remove any previously configured notification request for specified condition and recipient.

Examples

Send notification to the owner of workflow blah and bob@dobbs.com on completion.

swif2 notify blah -when done
swif2 notify blah -when done -email bob@dobbs.com

Do not send notification to bob@dobbs.com on completion of workflow blah.

swif2 notify blah -when done -email bob@dobbs.com -clear