User notifications from script

icejoran
New Contributor

Dear JAMF friends,

I wrote a script which users can run via the selfservice/policy. This script takes a long time to finish because i need to fetch several GBs from a server. Since there is some waiting time involved i'd like to give my users a popup notification like, 'your data is downloading', 'your data is extracting'.

The jamf binary has those capabilities because it's able to give the cool transparent popups, and it would be awesome to use those in my script.

Can give anyone an enlightening hint?

Many thanks :)

1 ACCEPTED SOLUTION

jpfromdc98
New Contributor III

You could utilize the jamfhelper throughout your script to convey messages. I would recommend searing throughout the discussions for jamfhelper messages or things along those lines.

This particular discussion thread helped me.

https://jamfnation.jamfsoftware.com/discussion.html?id=9848

If you're like me and want to get a pinch more creative, you could add graphics in there to create a make-shift loading bar.

View solution in original post

6 REPLIES 6

jpfromdc98
New Contributor III

You could utilize the jamfhelper throughout your script to convey messages. I would recommend searing throughout the discussions for jamfhelper messages or things along those lines.

This particular discussion thread helped me.

https://jamfnation.jamfsoftware.com/discussion.html?id=9848

If you're like me and want to get a pinch more creative, you could add graphics in there to create a make-shift loading bar.

mm2270
Legendary Contributor III

Have you looked at scripts that use cocoaDialog at all? There are plenty of them posted here on JAMFNation. cocoaDialog has a programmable 'progress bar' mode that can update the text in the dialog as different parts of the script take place and can even show real progress if its scripted correctly.
Although you can use built in tools like jamf binary or jamfHelper, using those to update regular "progress" aren't really their fortes.

dwandro92
Contributor III

+1 for cocoaDialog. The project is no longer maintained, but it still works.

jacob_salmela
Contributor II

I use a branded terminal-notifier for things like this for a more native feel.

icejoran
New Contributor

I just found out about jamfhelper :)
I know about cacaoDialog but it's nicer to use software which is installed already

Not applicable

There's also Yo which is a Swift app to create native Notification Center messages - same thing though, requires some effort and adds complexity to scripting.