I currently have 3 cronjobs running 3 different php scripts at set times.
The php scripts each execute a slightly different external cgi that causes a cctv camera to change position, the code that makes the magic happen looks like this:
<?php echo @stripslashes( @join( @file( "http://[cameraurl]:80/decoder_control.cgi?command=31" ),"" ) )?>
(that would make the camera tilt to preset one, 32 is preset two etc)
The 3 cronjobs each occur on a different hour (6am, 2pm, 10pm).
To simplify things, I would like to make a cronjob run every hour, and activate one php script that does everything.
For example the php script should, in english:
Get the time
If the time is between 5am and 7am, run this cgi script ...
If the time is between 10am and 1pm run this cgi ...
etc
You hopefully get the idea, sadly I have no idea where to start on this (newbie). Tried searching around for similar scripts for ideas, but I couldn't find anything too helpful.
The main reason I want to do this is because my cheap webhost only allows 3 cronjobs to run, and I'd like to add in some more preset commands (which would be possible when it's run every hour).
Thanks in advance for any help.