schibsted-tech-polska/svd-scheduler-bundle

This package is abandoned and no longer maintained. No replacement package was suggested.

Scheduler Bundle

1.1.2 2016-02-10 16:31 UTC

This package is not auto-updated.

Last update: 2017-09-16 09:10:39 UTC


README

Configuration

svd_scheduler:
    job_provider: 
    	name: mongo
    processes_limit: 5
    worker_interval: 1
    clock_interval: 60

You can use as provider mongo or redis.

Parameter worker_interval is optional. It sets how long worker should sleep between iterations. Default value is 1, it represents 1 second. You can also use float as value. It is the same with clock_interval but it is set to 60 as default`.

Mongo

This provider use MongoClient to communicate to MongoDB, to configure it add following parameters to your configuration

svd_scheduler:
    job_provider: 
        name: mongo
        config:
            auth: false
            collection: job
            database: dbname
            host: localhost
            password: ~
            port: 27017
            username: root

Redis

Redis provider use Predis library to connect to redis.

Configuration:

svd_scheduler:
    job_provider:
        name: redis
        config:
            scheme: tcp
            host: 127.0.0.1
            port: 6379
            var_prefix: db:

If you want to see whole list of config parameters, go to:

https://github.com/nrk/predis/wiki/Connection-Parameters

We added also option var_prefix to set prefix for all redis variables for project, so you can use the same redis database for several applications.

Usage

To manage scheduler we provide command line tools.

app/console job:insert [-c|--comment[="..."]] expression cmd
app/console job:update [-E|--expression[="..."]] [-C|--cmd[="..."]] [-c|--comment[="..."]] id
app/console job:delete id
app/console job:list