Exemple #1
0
 def test_PeriodicTask_unicode_clocked(self):
     time = make_aware(datetime.now())
     p = self.create_model_clocked(clocked(time), name='clocked_event')
     assert str(p) == '{0}: {1} {2}'.format('clocked_event', str(time),
                                            True)
Exemple #2
0
    def schedule(self):
        if self.interval == JobExecutionType.TYPE_FUTURE:
            # This is one-time clocked task
            return clocked(clocked_time=self.start_time)

        return self.to_cron()