Scheduled lock/unlock of iPad

New Contributor III

We're setting up an iPad to act as a check in kiosk. I've already restricted to a single app, turned off the buttons, etc and it works beautifully. The last request from the higher ups is to find a way to either dim or sleep the display outside of business hours to prevent burn-in/backlight failure.

From what I've seen this doesn't appear to be possible yet. Has anyone come across a way to programmatically sleep/wake an iOS device via MDM or other means?


Valued Contributor

You could use the API to send it a lock command (this effectively sleeps it) as a script on a scheduler like cron.

This should work, just replace id with the device ID you want to hit:


import requests
import json

usr = 'apirobotorwhoever'
pwd = 'yourpassword'
jss = ''
id = '5133'

r = + '/JSSResource/mobiledevicecommands/command/DeviceLock/Lock+Message/id/' + id, auth=(usr, pwd))
print r.text

Then just hit the home button to wake it when you want to use it.

New Contributor

I'm also interested in this but I don't see any option to push an API command on a schedule. Any advice?