Results 1 to 3 of 3

Thread: cron job activation automation

  1. #1

    Join Date
    Apr 2008
    Posts
    3

    Default cron job activation automation

    I'm trying to automate the process in which members profiles are automatically reactivated via the following SQL (auto_active.sql):

    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';
    the script cron calls (auto_active.sh) :

    Code:
    mysql -ppassword -u root -D databasenamehere < auto_active.sql
    and the crontab:

    Code:
    */1 * * * * /home/mcstaff/auto_active.sh
    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?

    Ubuntu Linux 7.40, no major mods, dolphin 6.005.

  2. #2
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default

    Do it as a php file.... not .sh file..... you can call the .php file as a cron
    and you need a database connection - include your header.inc.php and db.inc.php - and use the Dolphin database calls to do the database work.

    Smoge
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

  3. #3
    Administrator Smoge's Avatar
    Join Date
    Mar 2005
    Posts
    6,634
    Blog Entries
    5

    Default

    better yet - update the ray .php code - and make it so it is set to approved right on the media changes/uploads...
    ModMySite Administrator

    Problems? Questions? Need modifications or other help with your site?

    Open A Ticket , Send Us An Email Or Give Us A Telephone Call +1 518-632-4152.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Activation Email Not Sent In 6.0.2
    By SittingOut in forum Dolphin General Discussion v6.00 and above
    Replies: 7
    Last Post: 03-26-2008, 06:48 AM
  2. Login only after activation ?!
    By Kleetus in forum General Issues, Comments, Questions
    Replies: 2
    Last Post: 08-26-2007, 11:02 PM
  3. Activation Problem
    By ercan_bora in forum General Troubleshooting
    Replies: 0
    Last Post: 06-15-2007, 10:23 AM
  4. Automatic Activation
    By webbuddy in forum General Troubleshooting
    Replies: 21
    Last Post: 05-15-2007, 04:53 PM
  5. Database activation failed - fix ?
    By dangerboy in forum General Troubleshooting
    Replies: 1
    Last Post: 02-15-2007, 09:08 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •