Re: Running a script with Crontab

From: Date: Sun, 30 Sep 2001 18:44:36 +0000
Subject: Re: Running a script with Crontab
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-69379@lists.php.net to get a copy of this message
At 01:25 PM 9/30/2001, ani@lamundial.net wrote:
This is what I do, maybe is gonna help you bash file structure:
     #!/bin/bash
     ##
     ##  mysql maintenance
     ##
     /usr/bin/mysql -u username --password=yourpassword <<EOF
     use yourdatabase;
     YOUR SQL query HERE;
     exit
     EOF
then chmod +x yourbashfile so "cronjob" this file with the desired frecuency
BAD BAD BAD idea. if this is a public server (linux that's not running the openwall patch, for example) then anyone can see your password with a ps auxwww while it's running. Scripts I run from cron are usually recalculation scripts in the middle of the night that take 10-15 mins to run, and as such would give anyone more than enough time to grab it while the script is running, not that it's not possible to grab it even with a shorter execution time as well. -j --------------------------------------------------------
Jeffrey Paul      sneak@datavibe.net      (877) 748 3467
ICQ: 14295546     AIM: kw34hd1     NXTL/DC: 130*21*16749
PGP: 0xF50BB9D7 A21AFD828C30EC77CCCC545DA0B3F501F50BB9D7

« previous php.general (#69379) next »