This question already has an answer here:
I would like to run a script at wakeup. So my laptop is sleeping, I open the lid, and the script should run immediately or within the minute after wakeup. This script should run at startup as well, as that is essentially the same situation.
How can I run a cronscript at either wakeup and startup?