Find the answer to your Linux question:
Results 1 to 4 of 4
Hi, A buddy of mine is trying to set a cron task. I rarely use cron, so I'm not great for answering this one - basically he has a perl ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133

    Question Cron problem


    Hi,
    A buddy of mine is trying to set a cron task. I rarely use cron, so I'm not great for answering this one - basically he has a perl script that he needs to run at the start of every hour

    Code:
    0 * * * * username /home/username/public_html/stats/directory/stats.pl
    This is what he's running, but it isn't kicking off. The script is marked executable, script runs normally when fired manually. crond is running. Any ideas? btw access to the box is through ssh, so no graphical assistants please

  2. #2
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,133
    I have a feeling this might be the username ... Don't think it needs to be there, but jobs running as root have 'root' where I have username above. Any thoughts....

    Cheers,
    Tom.

  3. #3
    Linux Enthusiast scientica's Avatar
    Join Date
    Sep 2003
    Location
    South- or "Mid-" Sweden
    Posts
    742
    it looks syntactically (<-- I think it's the corect term ) right to mee. I'm using vixie-cron and it looks like my lines, the format for whatever format the cron deamon uses it should be documented in "man 5 crontab" (without the 5 you'll end up in 1st man page (the command crontab and not the file)) - are you sure he's not running some "unorthodox" cron? (iirc gentoo install manual mentions 1 or 2 cron's with different format from the "old tried and true")
    Regards Scienitca (registered user #335819 - http://counter.li.org )
    --
    A master is nothing more than a student who knows something of which he can teach to other students.

  4. #4
    Linux User
    Join Date
    Jan 2006
    Posts
    251
    May be the cron daemon should be restarted(u might have done this) and try removing the username
    my crontab entry as root
    1 4 * * * /u/home/backup.sh

Posting Permissions

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