Skip to content

SimpleMDM product announcement: Scheduled scripts and auto attributes

SimpleMDM Favicon
SimpleMDM|July 13, 2023
Product Article background
Product Article background

The SimpleMDM team is here with some exciting new features! You can now schedule scripts to run later or recurringly, and you can automatically populate custom attributes from the output of scripts. These new features come with a slick new UI framework that will expand across the application going forward.

While SimpleMDM collects a considerable amount of data out of the box and can be used to perform many different actions on devices, the ability to run scripts opens the door to nearly endless possibilities. With auto attributes, collecting information from devices is now nearly infinite as well.

Scheduled scripts

SimpleMDM has supported running scripts on devices since 2021. However, you could previously run scripts only in real time (unless using the API to create script jobs programmatically). Now, admins can create script jobs and elect to run them in the future at a scheduled time and date — or even run them on a recurring basis.

SimpleMDM supports the ability to run scripts on devices in any language that the device itself supports locally. It also does not require an installed agent to do so.

Creating & scheduling a script job in SimpleMDM

Let’s say we want to schedule a script to check the uptime for some of our Macs.

To create a script:

  1. Navigate to the Scripts section of the interface and click Create Script.

  2. Upload a script file, or type it into the text editor directly. Scripts must start with a shebang (#!/bin/bash).

  3. Save your script.

The script we’ll use for this example is very simple:

#!/bin/bash uptime

To create a script job:

  1. Under the Jobs section of the interface, click Create Job.

  2. Give your job a name and select your script.

  3. In the Run On field, select the devices or groups that you want to run the script on.

    Create Job

  4. At this point, you have a few options:

    1. Run ASAP: This runs the script immediately.

    2. Run later: This runs the script once at a later time and date of your choosing.

    3. Run recurringly: This allows you to schedule the script to run on a regular basis at specific times and days.

  5. In this example, we will schedule a script to run every Monday at 8 a.m. Eastern Time. To do so, select Mon in the Run every field, 8:00 AM in the At field, and Eastern Time in the time-zone selector.

  6. In the End recurring date field, you can choose if you want this job to stop running at a certain date or leave it blank to run it indefinitely.

    Run Options

  7. Next is the Attribute Options field — we are going to leave this blank for the time being. We’ll cover it more later.

  8. Finally, you can configure the Cancel job if not started after field to cancel a script job if it has not executed within a certain timeframe after it was scheduled. For example, if a device is offline when the script is scheduled to run and you want to ensure that it won’t execute at some unexpected time when that device comes back online, use this field. In this example, we’ll set it to 1 hour.

Now, click Create to schedule the script job. The script should execute within the specified timeframe.

Cancel job if not started

Viewing job history 

  1. Now that we have run a script, you can view the results by going to the Jobs section.

  2. Click the name of the job.

  3. Select the Devices tab.

  4. Then click the log corresponding to the device. This displays the output of the job along with some other metadata.

Auto attributes 

Running remote scripts is nice, and scheduling scripts is even better, but wouldn’t it be great if we could capture the output and store it in SimpleMDM? Well, yes — that would be very nice! Auto attributes do just that.

When creating a script job, SimpleMDM now supports the ability to store the output. This is configurable using the Attribute Options field on the Script Jobs page! Here’s how to use it:

  1. If you haven’t already, create a custom attribute by going to Configs > Attributes within the interface.

  2. On the Script Jobs page, check the box labeled Store script output in custom attribute on device record.

  3. In the Store output in field, select your custom attribute.

  4. SimpleMDM supports the ability to sanitize the script output using regex — use the Sanitize output with field to configure this as needed.

  5. Configure the other job settings as needed, and run it. That’s it!

Result: When devices respond with some output, the output is stored in the custom attribute on the device record.

Using our uptime example from earlier, here’s an example of what we see on the device record (under the Custom Attributes section of Device Details > Settings):


Scheduling scripts empowers admins to perform automated tasks on devices without having to do them manually in real time. Auto attributes allow admins to store information from devices based on the output of the scripts they run, drastically expanding the information collection and reporting capabilities of SimpleMDM. All attribute values are stored on device records within the interface and available via the Export Devices CSV. Custom attributes can even be included in the main Devices list in SimpleMDM by clicking the gear icon and editing the columns shown.

If you don’t already have SimpleMDM, sign up for a free trial to see these new features in action. You can also learn more about releases in our 2023 recap, or check out some of our personal favorites: welcome screen enhancements, account-driven enrollment, and Return to Service.

Happy scripting!

SimpleMDM Favicon

SimpleMDM is a mobile device management solution that helps IT teams securely update, monitor, and license Apple devices in a matter of minutes — all while staying on top of Apple updates automatically.

Related articles