
Jasmine
Administrator
/ Moderator
Jun 1, 2001, 6:29 AM
Post #4 of 13
(7863 views)
|
Re: Almost Finished! Need Help!
[In reply to]
|
Can't Post
|
|
So,i just put this: "0,30" * * * * * /full/path/to/cgi-bin/update.cgi into a text file,name it something like cronfile.txt,upload it and type crontab cronfile.txt and that it? Actually, that would be
0 30 * * * * /full/path/to/update.cgi Does the text file need anything else? No, that's all it needs.
like the shebang in a cgi script? Your update.cgi should have the shebang in it, so any other shebang isn't necessary. One important note... if your update.cgi is requiring other files, you should be sure to use full paths to the files in your require statement.
# wrong require "mylib.pl"; #right require "full/path/to/mylib.pl"; This is needed because cron is invoking your program from a different directory.
Does it matter where its uploaded to and crontabbed? Like,does it need to be in cgi-bin or what? No. Cron is like the ls and pwd commands in that they're available anywhere within your server space. It's extremely important to note that cron will not work unless your server administrator gives you cron access. Some do, some don't. Those that do may restrict your number of processes in a day. Hope this helps!
|