Cron Job


#1

OK well , yea Noob here ,
anyways
im trying to set up a cronjob for a cgi script that auto updates the unbuilt news on my page.
anyways
in shell im typing
eg

          • /home/ktonix/ktonix.com/kpanel/autobuild.cgi?full

it returns
bash: Maildir: command not found
what am I doing wrong?


#2

The shell ain’t a web server :wink:

The ?full stuff is CGI and the shell doesn’t do CGI, the web server does. What the web server does is set the value of the QUERY_STRING to “full” and then run the program, where the program or script actually reads the environment variable.

What you want to do in crontab is pass command-line paramters which is a wholly different method, and possibly not supported by your CGI script.

So what you need to do is hack the script to read command-line parameters.

In Perl, they are in the @ARGV array.

Oh, and from the shell you do:

/home/ktonix/ktonix.com/kpanel/autobuild.cgi full

You’re not supposed to put the crontab stuff in front of the command in the shell.

:cool: Perl / MySQL / HTML CSS


#3

Ok thx , I figured it out :slight_smile:
Found out the the cgi script has a few bugs , so I might not run it after all