Disable screensaver

New Contributor III

Can someone advise on the easiest way to disable screensaver for all users (or currently logged in user) via Jamf Pro? I have some Mac Minis (MacOS 10.14) being used for digital signage and I'd like to push out a command so screensaver never comes on.

I've tried pushing the following terminal command as a policy to run at startup, login, and check-in. It never seems to work, so I'm guessing I've screwed something up:

sudo -u "${consoleUser}" defaults -currentHost write com.apple.screensaver idleTime -int 0

Any advice?