1
+ # 0. Contents
2
+
1
3
1 . [ Scheduling tasks] ( ./SCHEDULE.md#1-scheduling-tasks )
2
4
2 . [ Overview] ( ./SCHEDULE.md#2-overview )
3
5
3 . [ Installation] ( ./SCHEDULE.md#3-installation )
@@ -47,7 +49,7 @@ function takes a `cron` instance and a callback and causes that callback to run
47
49
at the times specified by the ` cron ` . A coroutine may be substituted for the
48
50
callback - at the specified times it will be promoted to a ` Task ` and run.
49
51
50
- ##### [ Top] ( ./SCHEDULE.md#1-scheduling-tasks )
52
+ ##### [ Top] ( ./SCHEDULE.md#0-contents )
51
53
52
54
# 3. Installation
53
55
@@ -77,7 +79,7 @@ numbers are shown as inclusive ranges.
77
79
5 . ` month=None ` Months (1..12).
78
80
6 . ` wday=None ` Weekday (0..6 Mon..Sun).
79
81
80
- ##### [ Top] ( ./SCHEDULE.md#1-scheduling-tasks )
82
+ ##### [ Top] ( ./SCHEDULE.md#0-contents )
81
83
82
84
## 4.1 Time specifiers
83
85
@@ -114,7 +116,7 @@ now = int(time.time()) # Unix build returns a float here
114
116
tnext = min (cron1(now), cron2(now), cron3(now)) # Seconds until 1st event
115
117
```
116
118
117
- ##### [ Top] ( ./SCHEDULE.md#1-scheduling-tasks )
119
+ ##### [ Top] ( ./SCHEDULE.md#0-contents )
118
120
119
121
## 4.3 How it works
120
122
@@ -166,7 +168,7 @@ my_cron(month=(2, 7, 10), hrs=1, mins=59) # moves forward 1 day
166
168
t_wait = my_cron(time.time()) # but month may be disallowed
167
169
```
168
170
169
- ##### [ Top] ( ./SCHEDULE.md#1-scheduling-tasks )
171
+ ##### [ Top] ( ./SCHEDULE.md#0-contents )
170
172
171
173
## 4.5 Limitations
172
174
@@ -205,7 +207,7 @@ adapt `cron.py` to account for this: its design focus is small lightweight code
205
207
to run on bare metal targets. I could adapt ` crontest.py ` but it would surely
206
208
fail in other countries.
207
209
208
- ##### [ Top] ( ./SCHEDULE.md#1-scheduling-tasks )
210
+ ##### [ Top] ( ./SCHEDULE.md#0-contents )
209
211
210
212
# 5. The schedule function
211
213
@@ -263,7 +265,7 @@ finally:
263
265
_ = asyncio.new_event_loop()
264
266
```
265
267
266
- ##### [ Top] ( ./SCHEDULE.md#1-scheduling-tasks )
268
+ ##### [ Top] ( ./SCHEDULE.md#0-contents )
267
269
268
270
# 6. Use in synchronous code
269
271
@@ -325,7 +327,7 @@ is also more versatile because the advanced features of `uasyncio` are
325
327
available to the application. The above code is incompatible with ` uasyncio `
326
328
because of the blocking calls to ` time.sleep ` .
327
329
328
- ##### [ Top] ( ./SCHEDULE.md#1-scheduling-tasks )
330
+ ##### [ Top] ( ./SCHEDULE.md#0-contents )
329
331
330
332
# 7. Hardware timing limitations
331
333
@@ -342,4 +344,4 @@ Boards with internet connectivity can periodically synchronise to an NTP server
342
344
but this carries a risk of sudden jumps in the system time which may disrupt
343
345
` uasyncio ` and the scheduler.
344
346
345
- ##### [ Top] ( ./SCHEDULE.md#1-scheduling-tasks )
347
+ ##### [ Top] ( ./SCHEDULE.md#0-contents )
0 commit comments