Run shell commands via HTML webpage/button?

Hey guys,

I got a issue here...

we have a development box and a UAT box that our webmasters use, they do the webpage development on the development box and and save changed files to a particular directory on the dev machine.

At a certain time of the day a cronjob kicks off and the development directory containing the changed files are "rsynced" with the UAT box.

now here is the dilema, the files are being changed much more frequently now and the single scheduled rsync is not keeping up with the amount of changes, so the webmaster are contacting us to manually run the rsync so they can see there changes in UAT.

Normally, I would just give them access to a restricted shell script that they could run themselfs at the command line that would kick off the rsync job. However, most of them are not familar/comfortable with Unix CLI --or just dont want to get involved with doing that.

So, with all that being said -- is there a way i could create a simple HTML page with button them could "click" that would execute the rsync command?

I know most web server development has been geared towards NOT allowing this type of interaction....

here is the command we run

00 18 * * 5 /usr/bin/rsync -aWvz -e ssh --delete --progress --safe-links /local/apps/iplanet/servers/docs/someserver.xyz.com/ webuser@someserver:/local/apps/iplanet/servers/docs/ > /local/home/webuser/rsync.out 2>&1

Solaris 8

thanks for any help guy

Take a look at http://cfaj.freeshell.org/testing/ for an example of running a command from a web page.

Hello Chris,
Prolly a little late with my query here but going through the source code i could not make out how u are calling the shell or cgi script. I mean there should be some kind of an event or action listener that calls the cgi script and displays the date in the new page.
My problem is I have an HTML page in which I would want to embed a tag or button which can call shell script on my server.

I use a link to the script:

<a href="date.cgi">date.cgi</a>

Or I put it in a form:

 <form action="date.cgi">
  <p style="margin: 2em 20%;">
    <input type="submit" value="DATE" >
  </p>
 </form>

And embed it in the page with a server-side include:

    <pre>
    <!--#include virtual="date.cgi" -->
    </pre>