Skip to content

Commit

Permalink
DOC Update README.md for CMS 5
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Apr 19, 2023
1 parent a303359 commit 96ccde2
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,10 @@ The module comes with

## Installation

```
```sh
composer require symbiote/silverstripe-queuedjobs
```

Now setup a cron job:

```
*/1 * * * * /path/to/silverstripe/vendor/bin/sake dev/tasks/ProcessJobQueueTask
```

* To schedule a job to be executed at some point in the future, pass a date through with the call to queueJob
The following will run the publish job in 1 day's time from now.

```php
use SilverStripe\ORM\FieldType\DBDatetime;
use Symbiote\QueuedJobs\Services\QueuedJobService;

$publish = new PublishItemsJob(21);
QueuedJobService::singleton()
->queueJob($publish, DBDatetime::create()->setValue(DBDatetime::now()->getTimestamp() + 86400)->Rfc2822());
```

## Using Doorman for running jobs

Doorman is included by default, and allows for asynchronous task processing.
Expand Down

0 comments on commit 96ccde2

Please sign in to comment.