I have recently discovered on our older Meraki iPads, that any command send to the iPad gets stuck in the pending state. I kept the user logged in while waiting for the commands to run. The commands I tried were:
Some of the automatic commands such as TokenUpdate or Profiles refresh do appear to progress through to Success, although some of the Profiles refresh ones do appear to remain stuck in Pending. I tried manually rebooting one of the iPads but that didn't work. Sometimes, after a period of time, the Command state changes to Cancelled.
I had to fix a non-complient issue on this group of iPads a while ago, but after wiping the iPads then, they successfully connected back in and installed the appropriate apps. These iPads have shared accounts with apple school manager. Our newer and non-shared iPads appear to be working as normal.
Sometimes the iPads did lock themselves, but I didn't manually log the users out. The iPads won't have jumped to a random network.
I tried a remote restart which didn't work, but one quite interesting thing occurred though. After issuing the remote restart, I waited and refreshed the activity log every so often and ensured the iPad remained unlocked. The Restart Device command stayed in pending. After about 10 minutes of keeping the iPad unlocked, I logged the user out and back in again. The Restart Device command then changed to Cancelled, but the time stamp in which the task completed was the same as when it was issued.
In summary, the Restart Device command appeared to cancel instantly, but I had to log the user out and back in for the update to be reflected in the activity log.