0.3.6 • Published 2 years ago

mssqltask v0.3.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 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

2 years ago

0.3.5

2 years ago

0.3.2

2 years ago

0.3.1

2 years ago

0.3.4

2 years ago

0.3.3

2 years ago

0.2.1

2 years ago

0.1.2

2 years ago

0.2.0

2 years ago

0.1.1

2 years ago

0.2.3

2 years ago

0.1.4

2 years ago

0.2.2

2 years ago

0.1.3

2 years ago

0.2.4

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.3

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.6

3 years ago

0.0.2

3 years ago

0.0.1

3 years ago