[thelist] cron jobs

Dean Mah dsmah at home.com
Thu Dec 14 11:13:12 CST 2000


Dan's example used a shell script rather than a Perl script.  You
should use:

   #!/bin/sh

   lynx http://aussiebidder.com/cgi-bin/autoclose.cgi

Or write it in Perl as:

   #!/usr/bin/perl

   system 'lynx', 'http://aussiebidder.com/cgi-bin/autoclose.cgi';

or the equivalent using backticks or exec calls.

Dean


Adrian Fischer writes:

> Thanks djc,
> thisis what I used:
> #!/usr/bin/perl
> 
> # untitled1.cgi
> 
> http://aussiebidder.com/cgi-bin/autoclose.cgi
> 
> 
> Using that I get this
> "
> Bareword found where operator expected at
> /home/1/2/afischer/aussiebidder.com/cgi-bin/emailcheck.ch line 5, near
> "file://aussiebidder"
> (Missing operator before aussiebidder?)
> syntax error at /home/1/2/afischer/aussiebidder.com/cgi-bin/emailcheck.ch
> line 5, near "file://aussiebidder"
> Execution of /home/1/2/afischer/aussiebidder.com/cgi-bin/emailcheck.ch
> aborted due to compilation errors.
> "
> 
> even if I used the "lynx" it didnt make a difference.  Ive tried just about
> every permutation I can think of, and the php3 one still doesnt even show up
> with an error...just zip
> 
> Adrian
> > You can't run web scripts through CRON. You have to run them through your
> > webserver. Instead of pointing directly to the PHP or CGI files in your
> > CTB, point to a shell script that calls those .cgi's and .php's through a
> > web interface. Create a shell script for each of them like this:
> >
> > #!/bin/bash
> > # lets name this run1.sh
> > lynx http://www.bah.com/cgi-bin/autoclose.cgi
> >
> > for the first one, and similar for the others. then in your ctb, call each
> > of the shell scripts(liek run1.ch up there) instead of the .cgi of .php
> > files..




More information about the thelist mailing list