#1
  1. Mad Scientist
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Oct 2007
    Location
    North Yorkshire, UK
    Posts
    3,661
    Rep Power
    4123

    I thought I knew Cron.....


    ....But then I saw this syntax:

    Code:
    */10	*	*	*	* cmd/to/run
    can anyone tell me what the */10 means in the minutes column?


    More importantly, I'm trying to stop it attempting to send emails. at the moment I have

    Code:
    path/to/php path/to/script/to/run > path/to/log/file
    BUt after my server updated it's version of plesk I'm now getting emails, can i do

    Code:
    path/to/php path/to/script/to/run > path/to/log/file >  /dev/null 2>&1
    to prevent emails?
    I said I didn't like ORM!!! <?php $this->model->update($this->request->resources[0])->set($this->request->getData())->getData('count'); ?>

    PDO vs mysql_* functions: Find a Migration Guide Here

    [ Xeneco - T'interweb Development ] - [ Are you a Help Vampire? ] - [ Read The manual! ] - [ W3 methods - GET, POST, etc ] - [ Web Design Hell ]
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2006
    Posts
    2,449
    Rep Power
    1751
    I believe the */10 means every 10 minutes - at HH:10, HH:20, HH:30, etc.
    If your script produces emails then redirecting output is not going to prevent the mails from being pushed out by the mailer program being used - even if you could do what you are trying (the double redirection).
    If you don't want mails beign sent then just comment out (or remove) that entry from your crontab. Problem with that, of course, is if you want other things the script does. In that case you'll need to find the 'payload' within the script and comment that part out.
    The moon on the one hand, the dawn on the other:
    The moon is my sister, the dawn is my brother.
    The moon on my left and the dawn on my right.
    My brother, good morning: my sister, good night.
    -- Hilaire Belloc
  4. #3
  5. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,441
    Rep Power
    4539
    from man 5 crontab
    Step values can be used in conjunction with ranges. Following a range
    with "<number>" specifies skips of the numberís value through the
    range. For example, "0-23/2" can be used in the hours field to specify
    command execution every other hour (the alternative in the V7 standard
    is "0,2,4,6,8,10,12,14,16,18,20,22"). Steps are also permitted after
    an asterisk, so if you want to say "every two hours", just use "*/2".
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester

IMN logo majestic logo threadwatch logo seochat tools logo