Welcome to the JaguarPC Community
JaguarPC
Sales: (888) 338-5261
Support: (888)-551-3050
Results 1 to 4 of 4

This is a discussion on Desperately need help with cron job! in the Shared & Semi-Dedicated forum
This used to run and no longer runs as a cron job. The command is entered via control panel like so: ~/www/cgi-bin/getbullion2656_5.cgi First line of ...

  1. #1
    JPC Member
    Join Date
    Mar 2003
    Posts
    9

    Desperately need help with cron job!

    This used to run and no longer runs as a cron job. The command is entered via control panel like so:

    ~/www/cgi-bin/getbullion2656_5.cgi

    First line of this CGI contains #!/bin/sh, I can run this from my cgi-bin directory like so:

    ./getbullion2656_5.cgi

    and from command line this has no trouble generating non-zero output.

    CGI file generates output with a redirect:

    #!/bin/sh
    perl /home/beartopi/www/cgi-bin/bullionfilter.pl 250 0 5 2656 > /home/beartopi/w
    ww/cgi-bin/bullion2656_5.txt

    This all worked just fine last week.

    I tried adding more cron jobs via control panel and ran into a limit. Last night got an expert to help me edit crontab with using ranges in hours. This morning woke up and saw that all my output files were completely zeroed out. I emptied out cron jobs via control panel I tried putting back in one cron job (via control panel) the way I had it working before but still no luck.

    All my permissions are now cranked up to the max. Now when my one cron job runs it just zeroes the output.

    I also tried entering a cron job with full path as:
    /home/beartopi/www/cgi-bin/getbullion2656_5.cgi

    and it makes no difference.

    What have I done to cron jobs???? Please help, as last week my cron jobs were working and now no longer do. I need to get this working, like immediately.

  2. #2
    Community Leader jason's Avatar
    Join Date
    Sep 2001
    Location
    Rochester, NY
    Posts
    6,003
    Weird. If you haven't already done so, I would open a support ticket on this. It sounds as if cron somehow got corrupted on your server.

    --Jason
    Jason Pitoniak
    Interbrite Communications
    www.interbrite.com www.kodiakskorner.com

  3. #3
    JPC Member
    Join Date
    Mar 2003
    Posts
    9
    If anyone cares, I have finally discovered the cause of the mysterious cron failure. To track it down, I added redirected error output to my cgi command like so (note the addition of 2>err.out)

    perl /home/beartopi/www/cgi-bin/bullionfilter.pl 250 0 5 2656 > /home/beartopi/w
    ww/cgi-bin/bullion2656_5.txt 2>err.out

    then set a cron job up to run. My output file, once again, was zeroed out.

    I found err.out sitting in my home directory and it had all kinds of Perl complaints, stuff about not finding something in @INC. Definitely a path problem.

    So, I added a line like the following to each of my .pl files called from cgi files, so cron would find my homegrown Perl module:

    use lib qw(/home/beartopi/www/cgi-bin) ;

    In this case my module is called mylib.pm so my .pl files also have

    use mylib ;

    I'm crossing my fingers and hoping this fix "holds".

  4. #4
    JPC Member
    Join Date
    Mar 2003
    Posts
    9
    I should add that my sample cron job that "happened" to run wasn't referencing any outside libraries, hence my descent into madness on Monday.

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
  •