Commits

Tetsuya Morimoto committed 32d55aa

fixed to show shorter message in traccron settings page

Comments (0)

Files changed (1)

src/traccron/scheduler.py

 class CronScheduler(Component, SchedulerType):
     """
     Scheduler that used a cron-like syntax to specified when task must
-    be triggered
+    be triggered. Use cron like expression,
+    set either day-of-month or day-of-week and other one must be '?'
+
+    ex: *  *  *  ?  *  ?  *
+        ┬  ┬  ┬  ┬  ┬  ┬  ┬
+        │  │  │  │  │  │  └--── year (omissible)
+        │  │  │  │  │  └─────── day of week (1 - 7, 1 is Monday)
+        │  │  │  │  └────────── month (1 - 12)
+        │  │  │  └───────────── day of month (1 - 31)
+        │  │  └──────────────── hour (0 - 23)
+        │  └─────────────────── min (0 - 59)
+        └────────────────────── None (reserved?)
     """
     cron_syntax = re.compile(r"""
         (?P<value>
         return 'cron'
 
     def getHint(self):
-        return """Use cron like expression,
-        set either day-of-month or day-of-week and other one must be '?'
-
-        ex: *  *  *  ?  *  ?  *
-            ┬  ┬  ┬  ┬  ┬  ┬  ┬
-            │  │  │  │  │  │  └--── year (omissible)
-            │  │  │  │  │  └─────── day of week (1 - 7, 1 is Monday)
-            │  │  │  │  └────────── month (1 - 12)
-            │  │  │  └───────────── day of month (1 - 31)
-            │  │  └──────────────── hour (0 - 23)
-            │  └─────────────────── min (0 - 59)
-            └────────────────────── None (reserved?)
-        """
+        return 'ex: * 5 10 * * ? * fire every day at 10h5'
 
     def compareTime(self, currentTime, schedule_value):
         self._output_comp_debug_log(currentTime, schedule_value)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.