I'm trying to automate the process in which members profiles are automatically reactivated via the following SQL (auto_active.sql):
the script cron calls (auto_active.sh) :Code:UPDATE `amp`.`RayMp3Files` SET `Approved` = 'true' WHERE `RayMp3Files`.`ID` > 0; UPDATE `amp`.`RayMusicFiles` SET `Approved` = 'true' WHERE `RayMusicFiles`.`ID` > 0; UPDATE `amp`.`Profiles` SET `Status` = 'Active' WHERE `Profiles`.`ID` > 0 ; UPDATE `amp`.`ProfilesSettings` SET `Status` = 'Active' WHERE `ProfilesSettings`.`Status` = 'Approval';
and the crontab:Code:mysql -ppassword -u root -D databasenamehere < auto_active.sql
as you can guess im trying to allow this to run on every minute. the script works if i just execute ./auto_activate.sh and works as desired however the cron job fails without error. any ideas?Code:*/1 * * * * /home/mcstaff/auto_active.sh
Ubuntu Linux 7.40, no major mods, dolphin 6.005.


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks