Run Cygwin script on shutdown or startup
<p>I'm extremely new to Cygwin but I am somewhat comfortable in Linux (I can read man files fine).</p>

<p>I want to create a BASH script using Cygwin that deletes the files in a folder on the shutdown signal given by Windows.  If this can't be done, I also could try deleting the files in the same folder on startup.  I installed CRON but does CRON only works for scheduled tasks, rather than on 'signals'?  Answers would be nice but a general idea of how to proceed would be even better! </p>

<p>I can write the script.  I just don't know exactly how Cywgin interacts with the Windows OS in order to perform these procedures.</p>

<p>Another question, how do I run CRON on Windows startup? </p>

<p>If it matters, my O.S. is Windows 10 x64 running Cygwin.</p>