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.

Cron Job in shell

Discussion in 'General Discussion' started by netlook, Apr 19, 2004.

  1. netlook

    netlook Well-Known Member
    PartnerNOC

    Joined:
    Mar 25, 2004
    Messages:
    335
    Likes Received:
    0
    Trophy Points:
    16
    Hello, please write me how can I add any cron jobs to make them working on my server automatically.

    I know, that it should be cron job, but I realy don't know where (in which file) I have to make the request. For eg. I want to clean my TMP from sess* files.

    Regards
     
  2. HostEntrance

    HostEntrance Active Member

    Joined:
    Apr 19, 2004
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Oh Canada
  3. netlook

    netlook Well-Known Member
    PartnerNOC

    Joined:
    Mar 25, 2004
    Messages:
    335
    Likes Received:
    0
    Trophy Points:
    16
    But cron.daily is a directory, and there are something like executable scripts, so have I write something in #/bin/bash :) or maybe should I pico there simple 40 4 * * * /something file? Excuse for my newbie questions, but I realy don't know...
     
  4. HostEntrance

    HostEntrance Active Member

    Joined:
    Apr 19, 2004
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Oh Canada
  5. netlook

    netlook Well-Known Member
    PartnerNOC

    Joined:
    Mar 25, 2004
    Messages:
    335
    Likes Received:
    0
    Trophy Points:
    16
    Ok, so I will make somethign like this:

    --
    rm -f /tmp/sess_*
    --

    as 1 file and I hope this would work for me :)
    Big THX.
     
  6. eth00

    eth00 Well-Known Member
    PartnerNOC

    Joined:
    Mar 30, 2003
    Messages:
    723
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    NC
    cPanel Access Level:
    Root Administrator
    Make sure the chmod is set correctly so it can execute or it will not work.
     
  7. netlook

    netlook Well-Known Member
    PartnerNOC

    Joined:
    Mar 25, 2004
    Messages:
    335
    Likes Received:
    0
    Trophy Points:
    16
    Yes, I noticed that when I try to check this :) Now everything seems to be ok :) THX
     
Loading...

Share This Page