예제 #1
0
    def test_match(self):
        tab = CronTab(None,
                      second='*',
                      minute='*',
                      hour='*',
                      day='*',
                      month='*',
                      dow='*')
        self.assertTrue(tab.match(time.gmtime()))

        tab = CronTab(None,
                      second='*',
                      minute='*',
                      hour='*',
                      day='*',
                      month='*',
                      dow='0,1,2,3,4,5,6')
        self.assertTrue(tab.match(time.gmtime()))
예제 #2
0
파일: test_cron.py 프로젝트: urt30plus/b3
    def test_match(self):
        tab = CronTab(None, minute='*', hour='*', day='*', month='*', dow='*')
        self.assertTrue(tab.match(time.gmtime()))

        tab = CronTab(None,
                      minute='*',
                      hour='*',
                      day='*',
                      month='*',
                      dow='0,1,2,3,4,5,6')
        self.assertTrue(tab.match(time.gmtime()))

        days = DayOfWeek.range(DayOfWeek.MONDAY, DayOfWeek.TUESDAY,
                               DayOfWeek.WEDNESDAY, DayOfWeek.THURSDAY,
                               DayOfWeek.FRIDAY, DayOfWeek.SATURDAY,
                               DayOfWeek.SUNDAY)
        tab = CronTab(None, minute='*', hour='*', day='*', month='*', dow=days)
        self.assertTrue(tab.match(time.gmtime()))
예제 #3
0
    def test_match(self):
        tab = CronTab(None, second='*', minute='*', hour='*', day='*', month='*', dow='*')
        self.assertTrue(tab.match(time.gmtime()))

        tab = CronTab(None, second='*', minute='*', hour='*', day='*', month='*', dow='0,1,2,3,4,5,6')
        self.assertTrue(tab.match(time.gmtime()))