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

    Join Date
    Oct 2007
    North Yorkshire, UK
    Rep Power

    I thought I knew Cron.....

    ....But then I saw this syntax:

    */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

    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

    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. Contributing User
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Mar 2006
    Rep Power
    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
    Rep Power
    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
    I've never been able to appreciate the sublime arrogance of folks who feel they were put on earth just to save other folks from themselves .." - Donald Hamilton

IMN logo majestic logo threadwatch logo seochat tools logo