MentDB, The digital brain.  About me Home
Back / All functions / Job

You can run MQL scripts automatically at specific times.

job add job create|insert|addjob showjob existjob generate updatejob updatejob removejob scheduler stopjob scheduler startjob scheduler restartjob scheduler status

job add <jobId> <scriptName> <pattern>

Synonymous

    job create|insert|add

Description

    To add a new job

Parameters

    jobId:   The job id - string - required
    scriptName:   The script name - string - required
    pattern:   The pattern - string - required
admin
script create "addition" 0 "[v1],[v2]" {

+ [v1] [v2];

};
job add "myJobId" "addition" "0 0 * * * ?"
mentdb
Job added with successful.

job show

Description

    To show all jobs

admin
job show
mentdb
{
"myJobId": {
"pattern": "0 0 * * * ?",
"scriptName": "addition",
"id": "myJobId"
},
"reset_server_id": {
"pattern": "0 0 0 * * ?",
"scriptName": "reset_server_id",
"id": "reset_server_id"
}
}

job exist <jobId>

Description

    To check if a job already exist

Parameters

    jobId:   The job id - string - required
admin
job exist "myJobId"
mentdb
1

job generate update <jobId>

Description

    To generate an update job update request

Parameters

    jobId:   The job id - string - required
admin
job generate update "myJobId"
mentdb
job update "myJobId" "addition" "0 0 * * * ?";

job update <jobId> <scriptName> <pattern>

Description

    To update a job

Parameters

    jobId:   The job id - string - required
    scriptName:   The script name - string - required
    pattern:   The pattern - string - required
admin
job update "myJobId" "addition" "0 1 * * * ?"
mentdb
Job updated with successful.
admin
job show
mentdb
{
"reset_server_id": {
"pattern": "0 0 0 * * ?",
"scriptName": "reset_server_id",
"id": "reset_server_id"
},
"myJobId": {
"pattern": "0 1 * * * ?",
"scriptName": "addition",
"id": "myJobId"
}
}

job remove <jobId>

Description

    To remove a job

Parameters

    jobId:   The job id - string - required
admin
job remove "myJobId"
mentdb
Job removed with successful.
admin
job show
mentdb
{
"reset_server_id": {
"pattern": "0 0 0 * * ?",
"scriptName": "reset_server_id",
"id": "reset_server_id"
}
}

job scheduler stop

Description

    To stop the job scheduler

admin
job scheduler stop
mentdb
Job scheduler stoped with successful.

job scheduler start

Description

    To start the job scheduler

admin
job scheduler start
mentdb
Job scheduler started with successful.

job scheduler restart

Description

    To restart the job scheduler

admin
job scheduler restart
mentdb
Job scheduler restarted with successful.

job scheduler status

Description

    To show the status of the job scheduler

admin
job scheduler status
mentdb
Running...




© 2012-2017 - Jimmitry Payet.