Cron
By Will Bontrager2004-01-09
The Sixth Field, The Command
The sixth field is the actual command that will be executed according to the schedule specified in the first five fields. The sixth field includes any parameters to be passed to the command.
When the command is a Perl script, you might or might not need to specify the location of Perl as part of the command. Your hosting company can tell you which applies for your server.
Here are a three command examples:
/www/cgi-bin/script.cgi
/usr/bin/perl /www/cgi-bin/script.cgi
/usr/bin/perl /www/cgi-bin/script.cgi response.txt
The first example is a Perl script without the location of Perl being specified.
The second example is the same script, but this time the location of Perl is specified.
The third example includes a parameter. Here, the parameter is "response.txt," which might be the file name that an autoresponder is to send, assuming the autoresponder script is named script.cgi. When a script requires parameters, it's instructions should clearly indicate what the parameters are and what they represent.
Tutorial Pages:
» Cron
» The Cron Table
» The Five Schedule Time Fields
» Hypothetical Situations
» The Hypothetical Situations Schedules
» The Sixth Field, The Command
» On-line Documentation for cron and crontab
» A Practice Script
» Conclusion
Copyright 2004 Bontrager Connection, LLC
| Related Tutorials: » How to Install PHP 5 on Linux » How to Install Apache 2 on Linux » How to Install MySQL 5.0 on Linux » SMB Caching » Mound --Bind » Tar Wild Card Interpretation |
