In a bash script, I currently have an event which I need to run at 4am. Since I haven't found a way of doing this, I have instead been using a cron task which runs at 4am.
However, I need to do the same thing in the script, running something at 3am but how do I check to know what time it is? Running an hourly check or something? This without having the script continuously using up resources to check the time because it would be busy doing other things.
do something now that it's three am