The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cronjob

Discussion in 'General Discussion' started by reporter, Aug 30, 2009.

  1. reporter

    reporter Active Member

    Joined:
    Jul 23, 2009
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    hello,
    i want cronjob 2 commands :

    freshclam
    (run every day)

    clamscan -r /home
    (run every day)

    :confused:
     
  2. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    7
    Trophy Points:
    0
    If you don't care about the time, you could just drop scripts to call these in /etc/cron.daily or use crontab -e to setup a specific time to run these.

    I'm not sure exactly what you are asking specifically ....

    How to setup cronjobs?
     
  3. logicsupport

    logicsupport Well-Known Member

    Joined:
    Jun 5, 2007
    Messages:
    138
    Likes Received:
    0
    Trophy Points:
    16
    You can setup the cron jobs as follows

    # crontab -e

    0 1 * * * clamscan -r /home >> /clamscan_log

    The above will run every day at 1 am
     
  4. Eric

    Eric Administrator
    Staff Member

    Joined:
    Nov 25, 2007
    Messages:
    746
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    Howdy,

    Make sure you run these as root, no other user will likely have the privileges to do these tasks.
     
  5. reporter

    reporter Active Member

    Joined:
    Jul 23, 2009
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    thaNKS
    but detected infected files not delete automaticlly
    i,d like infected file deleted auto:confused:
     
  6. reporter

    reporter Active Member

    Joined:
    Jul 23, 2009
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    please help me!
    :confused:
     
  7. Eric

    Eric Administrator
    Staff Member

    Joined:
    Nov 25, 2007
    Messages:
    746
    Likes Received:
    11
    Trophy Points:
    18
    Location:
    Texas
    cPanel Access Level:
    Root Administrator
    Howdy,

    You can add the --remove flag to have clamav remove files that it says are infected but I'd recommend using this flag with caution.

    Thanks!
     
Loading...

Share This Page