Is this what I'm supposed to use? It's the only place in the help doc I can find that talks about setting default notifications...
DeployJob : setDefaultEMailNotifier
This command adds new email Notification to the Default notification list.
No. I don’t think there is a blcli for normal job types. there’s probably a set of unreleased commands we can run to do it…
There's no released command as Bill stated, but I found some unreleased ones, although I haven't tried them.
Looks like you first have to create a Notification instance using the Notification namespace commands, and then use the setNotificationList command of the Job namespace to apply it on a job.
I'll have to play around with that to see if I can make it work, since there's not much documentation on those commands (unreleased...).
If you look at the docs for the unreleased commands you can see how the notification object is built for the deploy and then follow that same sequence for a batch job.
Thanks, I'll poke around to see if I can figure it out later and reply here with a working code sample.
blcli_execute Utility createModelObject Notification
blcli_execute Notification setRecipient "email@example.com"
blcli_execute Notification setStatusTypes 14
blcli_execute Notification setNotificationType 1
blcli_execute Utility storeTargetObject MyNotificationList
blcli_execute Job findByTypeGroupAndName "/Workspace" "notifyTest1" 200
blcli_execute Utility storeTargetObject job
blcli_execute Job add NAMED_OBJECT=MyNotificationList
blcli_execute Job update NAMED_OBJECT=job
should do it.