Script Command: SLEEP

J
John
G4s Secure Solutions (usa) Inc.

I'm looking to send a message to several devices every 8 hours so that all shifts workers receive the same message. Is there a max length to the sleep command? 

sleep

Initiates sleep mode on the device for a set period. Only use this command in scripts.

sleep [length]

Where length is in seconds

Example

To set the device to sleep for 5 seconds:

sleep 5

For example: 

showmessagebox "Please ensure you look both ways before you cross the street"

sleep 28800

showmessagebox "Please ensure you look both ways before you cross the street"

sleep 28800

showmessagebox "Please ensure you look both ways before you cross the street"

sleep 28800

Device Types: Android Enterprise
MobiControl Version: 14.5.3.1042

Thanks,

John

4 years ago
MobiControl - Android Script Engine
ANSWERS
RS
Rafael Schäfer Diamond Contributor
4 years ago

Ouch, doing that the really wrong way! Even sleep doesn't do, waht you want to!

Initiates sleep mode on the device for a set period

Save the Message as a Script in the Script Manager.

Then create a Profile using Task Scheduler.

There you can say how often and when etc. which script is executed.

Done.

But keep in mind. that it could maybe generate much server load, depending on the number of devices.

J
John
4 years ago

I'm not doing it this way, I was asking for suggestions or an alternative method. Thank you for your sugguestion.

M
MartinsKl
4 years ago (edited 4 years ago)

You could create a dummy file for filesync and at the end of it just run script to show it.
Or you can use Alert rules to run script. For example if device reconnects to soti server, it shows this msg.