+ Reply to Thread
Results 1 to 6 of 6

Thread: Cron support

  1. #1
    oiwio is offline x10 Sophmore oiwio is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    214

    Cron support

    I tried making my first cron today and Im getting a "/bin/sh: /home/oiwio/public_html/hpup: Permission denied"
    Im not very skilled with it yet so can someone help me out?

    my cron run command is "/home/oiwio/public_html/hpup"

    and the shell file is here
    Code:
    #!/bin/sh
    hpup2.pl
    and heres the perl file
    Code:
    #!/usr/bin/perl
    
    
    # PERL MODULE WE WILL BE USING
    use Mysql;
    
    
    # MySQL CONFIG VARIABLES
    $host = "fmammorpg";
    $database = "oiwio_oiwio";
    $tablename = "users";
    $user = "oiwio_oiwio";
    $pw = "PW";
    
    
    # PERL MYSQL CONNECT
    $connect = Mysql->connect($host, $database, $user, $pw);
    
    
    $connect->selectdb($database);
    
    
    $hp = 'hp + 1';
    
    
    $myquery = "INSERT INTO
    $tablename (username, hp)
    VALUES (*, $hp)";
    
    
    $execute = $connect->query($myquery);
    What I want this to do is go into the database and in the table oiwio_oiwio, +1 to all the users hp

    I am not sure what is wrong since I have no experiance with crons yet
    so if someone could help me that would be great.

  2. #2
    adrenlinerush's Avatar
    adrenlinerush is offline x10 Lieutenant adrenlinerush is an unknown quantity at this point
    Join Date
    Nov 2007
    Location
    Monmouth, IL
    Posts
    379

    Re: Cron support

    try adding the file extenstion to the run command and checking the chmod permissions on the file
    Austin Mount
    AAS, A+, Compaq/HP APS
    austin@adrenlinerush.net

  3. #3
    oiwio is offline x10 Sophmore oiwio is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    214

    Re: Cron support

    ok, now Im getting a "/home/oiwio/public_html/hpup.sh: line 2: hpup2.pl: command not found"

  4. #4
    oiwio is offline x10 Sophmore oiwio is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    214

    Re: Cron support

    now Im getting a:
    Can't locate Mysql.pm in @INC (@INC contains: /usr/lib/perl5/5.8.8/i686-linux /usr/lib/perl5/5.8.8 /usr/lib/perl5/site_perl/5.8.8/i686-linux /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at /home/oiwio/public_html/hpup2.pl line 4.
    BEGIN failed--compilation aborted at /home/oiwio/public_html/hpup2.pl line 4.

  5. #5
    pheonixco. is offline x10Hosting Member pheonixco. is an unknown quantity at this point
    Join Date
    Nov 2007
    Posts
    3

    Re: Cron support

    looking at your coding i think it would stuff up because of this
    $hp = 'hp + 1';
    if the health value on your game is $hp then its going to stuff up
    try something like this
    SET VALUES ($hp) = $hp+1
    as for your file not found check your account details and make sure its in a private folder and that the account details are right
    PW should be your username on databases password (just in case it is set as PW)
    Edit:
    looking again another thing
    i dont think you need to connect to the database
    Last edited by pheonixco.; 12-08-2007 at 12:24 AM. Reason: Automerged Doublepost

  6. #6
    oiwio is offline x10 Sophmore oiwio is an unknown quantity at this point
    Join Date
    Oct 2007
    Posts
    214

    Re: Cron support

    I used the $hp = '$hp + 1' because I didnt know exactly how to do that so I changed that.

    Another thing I dont understand is how its having a problem find the "use Mysql;" command. Im not sure how I would be able to fix that.

    And also, why wouldnt I need to connect to the database?

+ Reply to Thread

Similar Threads

  1. Staff Required for Open Support.
    By disturbedart in forum Scripts & 3rd Party Apps
    Replies: 16
    Last Post: 05-14-2008, 09:34 AM
  2. MySQL Cron job
    By carsey in forum Scripts & 3rd Party Apps
    Replies: 1
    Last Post: 10-25-2007, 12:45 PM
  3. Forum Board Support Questions
    By sakuraguy in forum Free Hosting
    Replies: 8
    Last Post: 09-03-2007, 04:08 AM
  4. Cerberus Support Center SMTP Help
    By TheJeffsta in forum Free Hosting
    Replies: 2
    Last Post: 05-12-2006, 04:25 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers