Community Forums
Connect with us on LinkedIn
  
+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Jan 2005
    Posts
    3

    Exclamation Cron Job

    Hello.

    i have a webspace account from a company.

    and i want to set up a cron job every min's or ever sec if thats possiable
    but i cannot seem to point it to the right dir for the file.

    on my ftp the file is located in /public_html/hlstats/hlstats.pl

    and for the cron job i have tryed many diffrent locations
    such as

    /home/gameres/public_html/hlstats/hlstats.pl
    /home/hlstats/hlstats.pl

    does anybody know where i could point it to find the file.

    Thanks for any help

    Kev

  2. #2
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    Is that script written to be run as a cron job?

    Try putting:
    perl /home/gameres/public_html/hlstats/hlstats.pl
    as the command.
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    3

    Default

    nope it didnt work

    it gave me

    Can't locate .//ConfigReaderSimple.pm in @INC (@INC contains: /usr/lib/perl5/5.8.4/i686-linux /usr/lib/perl5/5.8.4 /usr/lib/perl5/site_perl/5.8.4/i686-linux /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at /home/gameres/public_html/hlstats/hlstats.pl line 50.

    um

    this is the link to the documentation what im following

    http://docs.unitedadmins.com/hlstats/en/

    Run hlstats.pl. It will by default run in the foreground (like HLDS) - to make it run in the background use something like:
    shell> ./hlstats.pl &
    HLstats is not required to run as root; running as an unprivileged user is recommened.

    Most shells will let you run a program in a loop, so that if it dies/crashes it will be automatically restarted. For example, you might want to try:
    shell> while true; do nohup ./hlstats.pl; sleep 5; done &
    (BASH Syntax) this line creates a loop, which appends any output from hlstats.pl into a file called nohup.out. If, for some reason hlstats.pl crashes, your server will wait 5 seconds, then restart hlstats.pl.


    but it tells to run as a background command and i have been told a cron job does this so i dont see the problem

    any ideas ??

    Kev

  4. #4
    Registered User
    Join Date
    Jan 2005
    Posts
    3

    Default

    ive edit that .pl file so it has the right links in the files

    and now it says

    Can't locate http://www.game-resource.co.uk/hlsta...eaderSimple.pm in @INC (@INC contains: /usr/lib/perl5/5.8.4/i686-linux /usr/lib/perl5/5.8.4 /usr/lib/perl5/site_perl/5.8.4/i686-linux /usr/lib/perl5/site_perl/5.8.4 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl .) at /home/gameres/public_html/hlstats/hlstats.pl line 50.


    it says it cannon locate but the file is there

    any ideas ??

    and it is possiable to set it to run all the time ?

  5. #5
    Member PWSowner's Avatar
    Join Date
    Nov 2001
    Location
    ON, Canada
    Posts
    2,994

    Default

    Sounds like a problem with the setup. For the cron job it should just be
    /home/gameres/public_html/hlstats/hlstats.pl
    but a cron job won't work if the script isn't working.



    For the path to the module, you don't use a URL, but the path on the server, like:
    /home/gameres/public_html/hlstats/ConfigReaderSimple.pm
    Mike
    WHM and cPanel Scripts (join our "Scripts Club")
    D/A Photography

Similar Threads & Tags
Similar threads

  1. Cron Job Help Please...
    By mikka12 in forum New User Questions
    Replies: 5
    Last Post: 07-12-2010, 08:49 PM
  2. How to cron job?
    By dachooch in forum New User Questions
    Replies: 4
    Last Post: 05-03-2010, 08:15 AM
  3. about cron job
    By persianwhois in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 06-14-2007, 08:28 AM
  4. cron job
    By albertldee in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 08-11-2003, 12:08 AM
  5. Cron Job
    By Dawson in forum cPanel and WHM Discussions
    Replies: 3
    Last Post: 10-13-2001, 07:06 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube