Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Location
    NJ
    Posts
    37

    Unanswered: trying to create cron job on redhat 9 to call perl script..please help

    I looked all over google and tried out the different ways that they said to set up cron to run my perl script but it is not running. This is the setup i currently have (mind you i am running redhat 9)

    I started playing around with crontab -e but that wasn't working so well for me so i opened and editted /etc/crontab. Here is what that looks like:
    ----------------------------------------------------------
    SHELL=/bin/bash
    PATH=/sbin:/bin:/usr/sbin:/usr/bin
    MAILTO=root
    HOME=/

    # run-parts
    01 * * * * root run-parts /etc/cron.hourly
    02 4 * * * root run-parts /etc/cron.daily
    22 4 * * 0 root run-parts /etc/cron.weekly
    42 4 1 * * root run-parts /etc/cron.monthly
    */1* * * * root /etc/cron.d/bandwidth.sh
    ------------------------------------------------------------
    This is my shell script in etc/cron.d it is called bandwidth.sh:
    ------------------------------------------------------------
    #!/bin/sh
    /home/databasestuff/bandwidth.pl
    ------------------------------------------------------------

    I have tried a variety of combinations to try and get this working and i haven't had any luck. As you can see my perl script is located in home/databasestuff/bandwidth.pl. I want to run this perl script every minute so that it updates my batabase with fresh information. I am new to cron and if anyone could hepl me out or tell me what i am doing wrong i would appreciate it

    thanks
    Evan

  2. #2
    Join Date
    Feb 2004
    Location
    NJ
    Posts
    37

    Re: trying to create cron job on redhat 9 to call perl script..please help

    Nevermind i figured it out, there was a permissions problem on the script file.. thanks anyways

Posting Permissions

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