Skip to content

Commit 259d6f9

Browse files
committed
Improve README + documentation
1 parent ad0c514 commit 259d6f9

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

DOCUMENTATION.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,27 +27,28 @@ Here is an example of what a jobs document looks like:
2727
{
2828
_id: "riEauLYngjSGoETWh",
2929
name: "sendEmail",
30-
created: 2019-01-13T14:24:42.444Z,
30+
created: "2019-01-13T14:24:42.444Z",
3131
serverId: "R7KPMHWz7DEsDWBCm",
3232
state: "success",
33-
due: 2019-01-13T14:24:51.444Z,
33+
due: "2019-01-13T14:24:51.444Z",
3434
priority: 0,
3535
arguments: ["sendReminder", "[email protected]", "The future is here!"],
3636
history: [{
37-
date: 2019-01-13T14:24:51.444Z,,
37+
date: "2019-01-13T14:24:51.444Z,",
3838
state: "success",
3939
serverId: "R7KPMHWz7DEsDWBCm"
4040
}, {
41-
date: 2019-01-13T14:23:51.444Z,
41+
date: "2019-01-13T14:23:51.444Z",
4242
type: "reschedule",
4343
serverId: "5whJ8rWzDcTv8aZGy",
44-
newDue: 2019-01-13T14:24:51.444Z
44+
newDue: "2019-01-13T14:24:51.444Z"
4545
}]
4646
}
4747
```
4848

4949
The history of each job is kept in the `history` field, which can also hold the result of the job, if you pass it into the `success` or `failure` action.
5050

51+
Note: dates are not stored as strings, this was just a hack to get around markdown rendering issues
5152

5253
### Jobs.configure
5354

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Run scheduled tasks with Steve Jobs, the simple jobs queue made just for Meteor.
1212
- Failed jobs are retried on server restart
1313
- No third party dependencies
1414

15-
**The <a href="https://github.com/msavin/SteveJobs..meteor.jobs.scheduler.queue.background.tasks/blob/master/CHANGES.md">new 3.1</a> features repeating jobs and more improvements.** It can run hundreds of jobs in seconds with minimal CPU impact, making it a reasonable choice for many applications. To get started, check out the <a href="https://github.com/msavin/SteveJobs..meteor.jobs.scheduler.queue.background.tasks/blob/master/DOCUMENTATION.md">**documentation**</a> and the <a href="#quick-start">**quick start**</a> below.
15+
**The new 3.1 features repeating jobs and more improvements.** It can run hundreds of jobs in seconds with minimal CPU impact, making it a reasonable choice for many applications. To get started, check out the <a href="https://github.com/msavin/SteveJobs..meteor.jobs.scheduler.queue.background.tasks/blob/master/DOCUMENTATION.md">**documentation**</a> and the <a href="#quick-start">**quick start**</a> below.
1616

1717
## Developer Friendly GUI and API
1818

@@ -86,7 +86,7 @@ The configuration object supports `date`, `in`, `on`, `priority`, `singular`, `u
8686

8787
## Repeating Jobs
8888

89-
Creating repeating jobs is easy, and you have total control over how they run. First, you need to create a job that will automatically replicate itself.
89+
Compared to a CRON Job, the Steve Jobs package gives you much more control over how and when the job runs. To get started, you just need to create a job that replicates itself.
9090

9191
```javascript
9292
Jobs.register({
@@ -115,7 +115,7 @@ Jobs.register({
115115
});
116116
```
117117

118-
Then, schedule the job to run with the `singular` flag, only if an instance of it does not exist.
118+
Then, you need to "kickstart" the queue by creating the first job to run. By using the singular flag, you can ensure that Meteor will only create the job if there is no pending or failed instance of it.
119119

120120
```javascript
121121
Meteor.startup(function () {

0 commit comments

Comments
 (0)