20个Crontab消息按顺序每隔15分钟交错

时间:2015-07-02 20:19:11

标签: php crontab

我尝试每15分钟发送一次消息。我有20条消息,我希望每条消息相隔大约15分钟发送,即消息3在消息2后15分钟发送,消息4在消息3后15分钟发送。现在我只是试图错开触发器工作,但有更高效/优雅的解决方案吗?谢谢你的帮助!

    14,29,44,59 10-21 * * * wget -q http://site/message2.php
    13,28,43,58 10-21 * * * wget -q http://site/message3.php
    12,27,43,57 10-21 * * * wget -q http://site/message4.php
    11,26,42,56 10-21 * * * wget -q http://site/message5.php
    10,25,41,55 10-21 * * * wget -q http://site/message6.php
    9,24,40,55 10-21 * * * wget -q http://site/message7.php
    8,23,39,54 10-21 * * * wget -q http://site/message8.php
    7,22,38,53 10-21 * * * wget -q http://site/message9.php
    6,21,37,52 10-21 * * * wget -q http://site/message10.php
    5,20,36,51 10-21 * * * wget -q http://site/message11.php
    4,19,35,50 10-21 * * * wget -q http://site/message12.php
    3,18,34,49 10-21 * * * wget -q http://site/message13.php
    2,17,33,48 10-21 * * * wget -q http://site/message14.php
    1,16,33,47 10-21 * * * wget -q http://site/message15.php
    0,15,32,46 10-21 * * * wget -q http://site/message16.php
    14,31,45,59 10-21 * * * wget -q http://site/message17.php
    13,30,44,58 10-21 * * * wget -q http://site/message18.php
    12,28,43,57 10-21 * * * wget -q http://site/message19.php
    11,27,42,56 10-21 * * * wget -q http://site/message20.php

1 个答案:

答案 0 :(得分:0)

尝试crontab: * / 15 * * * * wget -q http://site/message.php