Skip to content

Commit c5bb23c

Browse files
committed
Try ruby for the qrontabs in the readme
1 parent 479fff1 commit c5bb23c

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ A stupid Ruby cron thread that wakes up from time to time to perform according
1010
to what's written in a crontab.
1111

1212
Given `etc/qrontab_dev`:
13-
```
13+
```ruby
1414
@reboot p [ :hello, "just started" ]
1515
* * * * * p [ :hello, :min, Time.now ]
1616
* * * * * * p [ :hello, :sec, Time.now ]
@@ -45,7 +45,7 @@ A little brother to [rufus-scheduler](https://github.com/jmettraux/rufus-schedul
4545
### Timezones
4646

4747
It's OK to use timezones in the qrontab file:
48-
```
48+
```ruby
4949
30 * * * * Asia/Tokyo p [ :tokyo, :min, Time.now ]
5050
30 4 1,15 * 5 Europe/Budapest p [ :budapest, :min, Time.now ]
5151
```
@@ -55,7 +55,7 @@ It's OK to use timezones in the qrontab file:
5555

5656
A qrontab file accepts, cron and commands but also "settings" that set
5757
variables in the context passed to commands:
58-
```
58+
```ruby
5959
#
6060
# settings
6161

@@ -69,15 +69,13 @@ variables in the context passed to commands:
6969
```
7070
where the puts might output something like:
7171
```ruby
72-
[
73-
:ctx,
72+
[ :ctx,
7473
{ time: 'Time instance...',
7574
cron: 'Fugit::Cron instance...',
7675
command: 'pp [ :ctx, ctx ]',
7776
qron: 'The Qron instance...',
7877
a: 3,
79-
b: 'Time instance...' }
80-
]
78+
b: 'Time instance...' } ]
8179
```
8280

8381
A context is instantied and prepare for each command when it triggers.

0 commit comments

Comments
 (0)