As in subject, I want make bash script that will check the time, and when it is between 04:00-05:00 in night, it will execute one command.
Can someone help me?
The best way to schedule an event is using crontab.
For example, below crontab syntax will schedule to execute your script foo.sh at 04:00 AM daily.
0 4 * * * /bin/foo.sh