OSX Launch Daemon for Periodic Screenshots I'm trying to figure out how to create a daemon that will take screenshots every 5 minutes on OSX.

The daemon with launchctl seems to run under a separate session so the screenshots I'm getting right now are just of my blank home screen rather than my actual current session screen.

Currently I have a screencapture script:

#!/bin/bash

screencapture ~/Desktop/$(date +%y%m%d%H%M%S).png


And a plist file:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
        &lt;dict&gt;
                &lt;key&gt;Label&lt;/key&gt;
                &lt;string&gt;com.startup&lt;/string&gt;
                &lt;key&gt;Program&lt;/key&gt;
                &lt;string&gt;path_to_script/screenshots.sh&lt;/string&gt;
                &lt;key&gt;StartInterval&lt;/key&gt;
                &lt;integer&gt;15&lt;/integer&gt;
        &lt;/dict&gt;
&lt;/plist&gt;
In the comments to the question you say &quot;But just want it to track what I'm spending my time doing&quot;.
Interpreting your underlying question as being how to track application usage, I will risk being downvoted for not answering your question as in its title.
I think that a large collection of screenshots is not the best way to track what you are doing. Certainly further analysis will be complex.
To track application usage, I use Keyboard Maestro with a one action macro.

This creates a CSV file with three fields: Date, Time and Application name.
That will provide application usage in a form which is amenable to further analysis.