I Love You, Cron

My gosh, could it be? I believe I may have finally solved all of my problems with the cron manager. This isn’t the first time I thought this way, but I’ve just been through way too much.

I was able to create a bash file to execute a PHP page 20 times, in 15 second intervals. The bash file itself is executed every five minutes through cronman. So, here is the script that I created. It’s odd, but it works.

while [ “$i” != “20” ]; do
i=`expr $i + 1`;
/web/cgi-bin/php5 “$HOME/html/event.php” >> /dev/null;
sleep 15;

I wasn’t able to get a proper “for” loop running. I found out how to do a simlar loop using a “while” statement. Incrimenting the variable “i” was odd. I’m used to “i++”. With this script, I feel like I had to jump through hoops to get an odd expression to add 1 to i. You know what? It works. I am not sure why I am getting picky over its’ perfection.

I’m not getting any emails from normal operations either -which is what I like. I don’t need to be getting emails every five minutes when a job completes without error.

posted by Dedric Mauriac on Applewood using a blogHUD : [blogHUD permalink]

Comments are closed.

%d bloggers like this: