Results 1 to 6 of 6

Thread: cron jobs

  1. #1
    Join Date
    Jan 2006
    Posts
    264

    cron jobs

    I have added the following lines to my crontab.root file and they don't seem to be running...

    0 3 * * * /usr/local/bin/rkhunter --cronjob > /dev/null
    15 3 * * * /usr/local/chkrootkit/chkrotkit.sh

    It is suppose to email me results everynight and it doesn't do it.

    Did I put them in the wrong file?

  2. #2
    if you run the script manually, does it send the email?
    HalfDedi.com Half Dedicated Half Price
    We provide affordable VPS hosting solution Singapore datacenter

  3. #3
    Join Date
    Feb 2004
    Location
    UK
    Posts
    1,429
    Hi

    Did you do a restart of the cron service ?

    Thanks

  4. #4
    Join Date
    Mar 2005
    Location
    Labrador, Canada
    Posts
    951
    You should use:

    [[email protected]] crontab -e

    To edit cron jobs and not edit the cron files directly.

    To edit someone else's cron jobs use:

    [[email protected]] crontab -u username -e

  5. #5
    Join Date
    Jan 2006
    Posts
    264
    If I want the cronjobs to run all the time, even when I'm not logged in, do i just run cron -e or do I run crontab -u root -e
    ?

    I don't think I restarted cron. Was I suppose to?

  6. #6
    Join Date
    Mar 2005
    Location
    Labrador, Canada
    Posts
    951
    Cron jobs always run "all the time", regardless if you're logged in or not.

    With "crontab -e" you edit your own cron jobs. So if you're logged in as root you will be editing root's cron jobs. If you're logged in as "tom" you will be editing tom's cron jobs.

    Root has the power to edit other user's cron jobs. So if you're logged in as root you can do "crontab -u tom -e" to edit tom's cron jobs.

    When you use the crontab command there is no need to restart the crond service.

Posting Permissions

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