0.3.6 • Published 3 years ago

mssqltask v0.3.6

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

mssqltask

Features

  1. Cron-style scheduler
  2. Running at the same time on the server list
  3. Can save result to json files to disk
  4. Run in workers

License

MIT

Install

npm i mssqltask

Example

import * as mssqltask from 'mssqltask'
const task = mssqltask.Create({
    key: 'task1',
    metronom: {kind: 'cron', cron: '0 */1 * * * *'},
    servers: [
        {
            "instance": "./EXPRESS2017",
            "login": "sa",
            "password": "123456789"
        },
    ],
    queries: ["print 'hello'; select * from sys.objects; select * from sys.objects; print 'bye'"],
    processResult: {
        pathSaveTickets: 'c:/log',
        pathSaveRows: 'c:/log',
        pathSaveMessages: 'c:/log'
    }
})
task.maxWorkersSet(5) //if need - set limit, default = each mssql server run in individual worker
task.onError(error => {
    console.log(error)
})
task.onChanged(state => {
    console.log(state)
})
task.start()
0.3.6

3 years ago

0.3.5

3 years ago

0.3.2

3 years ago

0.3.1

3 years ago

0.3.4

3 years ago

0.3.3

3 years ago

0.2.1

3 years ago

0.1.2

3 years ago

0.2.0

3 years ago

0.1.1

3 years ago

0.2.3

3 years ago

0.1.4

3 years ago

0.2.2

3 years ago

0.1.3

3 years ago

0.2.4

3 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.3

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.6

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago