Cron job w/ Rev CGI

Andre Garzia soapdog at mac.com
Sun Jan 14 12:41:32 EST 2007


Bill,

also, if your CGI uses any environment variable that is only present  
during CGI "execution time" then this cron job will not work as  
expected. Invoking your CGI like this in a cron job will not have the  
same default folder as the apache cgi one nor it will have the  
friendly variables for you to poke at. If your CGI uses URL  
parameters for configuration of itself then you know why invoking by  
the command line will fail.

My take would use a cronjob to invoke wget with the CGI URL as a  
parameter such as:

>> */15   *   *   *   *   wget http://localhost/cgi-bin/script.cgi

Then your time execution would truly be the same thing as the browser  
being opened at a regular interval...

Andre


On Jan 13, 2007, at 11:47 PM, Bill Marriott wrote:

> Got it working...
>
> The tricks were:
>
> 1) path to my script was ./sitename/cgi-bin/script
>
> 2) I have to use the full pathname to the engine, e.g.:
>
> #!./sitename/cgi-bin/revolution
>
> at the start of my scripts
>
> The only remaining problem is that the server emails me every time  
> it runs:
>
> Could not open libgdk-x11-2.0.so: libgobject-2.0.so: cannot open  
> shared
> object file: No such file or directory
>
> otherwise the script runs perfectly.
>
> Any ideas how to eliminate/suppress that error message?
>
>
> "Dave Cragg" <dave.cragg at lacscentre.co.uk> wrote in
> message news:6F7C1897-7941-40E8-8A08-7FD2C6544D3B at lacscentre.co.uk...
>>
>> On 14 Jan 2007, at 00:32, Bill Marriott wrote:
>>
>>> Well, I have a little Rev CGI script that works exactly the way  
>>> I  want
>>> it to
>>> when I summon it from the address bar using a web browser... I  
>>> just  want
>>> it
>>> to do its thing every 15 minutes now. I don't even know the syntax/
>>> procedure
>>> for that.
>>
>> There's a good tutorial here.
>>
>> http://www.linux-tutorial.info/modules.php?name=Tutorial&pageid=78
>>
>> But basically, you need to enter a line in your crontab something   
>> like
>> the following:
>>
>> */15   *   *   *   *   /path/to/cgi/script.rev > /dev/null
>>
>> This will run the script every 15 minutes.
>>
>> Like Pierre, I like to use Cronnix on OS X. I'm generally nervous   
>> around
>> Linux, but I've used the following procedure before.
>>
>> 1.  Export the existing crontab to a file. The command would be
>>
>>    crontab -l > /path/to/file.txt
>>
>> 2.  Edit the file by adding your new entry (similar to the above   
>> example)
>> at the end.
>>
>> 3.  Re-install the settings:
>>
>>    crontab /path/to/file.txt
>>
>>
>> I suggest reading the tutorial first.
>> Be careful! :-)
>>
>> Dave
>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>
>
>
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list