I'm afraid my question will demonstrate just how little I know about Perl scripting, but here goes.
I have a variety of scripts that are automatically run through a cron job. In a few instances where I have had a problem with my connection or server, the job wouldn't run as scheduled. When that happens, it causes problems with the appearance of my web site.
Now, when I want to refresh the site by running these scripts manually, I have to run each script individually through shell commands.
What I'd like to have is a password-protected page where I could go to remotely, click on a button, and have all of the commands run from that one command. In other words, I'd like a one-stop location to run all of the script commands that appear in my cron so that I don't have to wait until the next time they are run by the cron.
Any ideas?
I'm thinking this wouldn't be too difficult, but I don't know where to start.
You can pass your password directly on the address: http://yourserver.com/thisScript.cgi?yourPassword
This would do the job:
______________________
#!perl
$| = 1;
print "Content-type:text/html\n\n";
if ($ENV{QUERY_STRING} ne "yourpassword") {
print "Wrong password.";
exit;
}
#This is an array containing every command
#you want to pass to the system. Write them
#exactly like you would write them on a command line.
#I'm using four very different examples:
Sorry, but it doesn't seem to work. It operates as if it's working. Reports with the proper messages as if it's working. But the scripts don't seem to be running.
Bookmarks