@@ -10,7 +10,7 @@ A stupid Ruby cron thread that wakes up from time to time to perform according
10
10
to what's written in a crontab.
11
11
12
12
Given ` etc/qrontab_dev ` :
13
- ```
13
+ ``` ruby
14
14
@reboot p [ :hello , " just started" ]
15
15
* * * * * p [ :hello , :min , Time .now ]
16
16
* * * * * * p [ :hello , :sec , Time .now ]
@@ -45,7 +45,7 @@ A little brother to [rufus-scheduler](https://github.com/jmettraux/rufus-schedul
45
45
### Timezones
46
46
47
47
It's OK to use timezones in the qrontab file:
48
- ```
48
+ ``` ruby
49
49
30 * * * * Asia / Tokyo p [ :tokyo , :min , Time .now ]
50
50
30 4 1 ,15 * 5 Europe / Budapest p [ :budapest , :min , Time .now ]
51
51
```
@@ -55,7 +55,7 @@ It's OK to use timezones in the qrontab file:
55
55
56
56
A qrontab file accepts, cron and commands but also "settings" that set
57
57
variables in the context passed to commands:
58
- ```
58
+ ``` ruby
59
59
#
60
60
# settings
61
61
@@ -69,15 +69,13 @@ variables in the context passed to commands:
69
69
```
70
70
where the puts might output something like:
71
71
``` ruby
72
- [
73
- :ctx ,
72
+ [ :ctx ,
74
73
{ time: ' Time instance...' ,
75
74
cron: ' Fugit::Cron instance...' ,
76
75
command: ' pp [ :ctx, ctx ]' ,
77
76
qron: ' The Qron instance...' ,
78
77
a: 3 ,
79
- b: ' Time instance...' }
80
- ]
78
+ b: ' Time instance...' } ]
81
79
```
82
80
83
81
A context is instantied and prepare for each command when it triggers.
0 commit comments