Lauchd - Run task multiple times between time interval
You can print the StartCalendarInterval dictionaries with something like this: for h in {0..4}; do for m in {0,15,30,45}; do echo "&lt;dict&gt;&lt;key&gt;Hour&lt;/key&gt;&lt;integer&gt;$h&lt;/integer&gt;&lt;key&gt;Minute&lt;/key&gt;&lt;integer&gt;$m&lt;/integer&gt;&lt;key&gt;Second&lt;/key&gt;&lt;integer&gt;0&lt;/integer&gt;&lt;/dict&gt;"; done; done.

You could also run the script every 15 minutes but exit it depending on the time:

h=$(date +%-H)
m=$(date +%-M)
[[ $h -gt 4 || $h -eq 4 &amp;&amp; $m -ne 0 ]] &amp;&amp; exit


Or run EDITOR=nano crontab -e and add a line like */15 0-4 * * * ~/bin/script.