Administrate the Jobs¶
The jobs in a PLOSSYS 5 system can be administrated via PLOSSYS CLI.
Hint - Web user interface
Some of the operations can be executed via PLOSSYS Administrator as well.
Requirements¶
For the requirements for using PLOSSYS CLI, refer to PLOSSYS CLI.
Options¶
Specific PLOSSYS 5 Server¶
For administrating the jobs of a specific PLOSSYS 5 server, specify the --server <plossys_server>
option. Default is https://localhost:8080
.
plossys job <command> --server https://<plossys_server>:8080
Example - show all jobs of the plossys.server1.com
server
plossys job show --server https://plossys.server1.com:8080
Self-Signed Certificates¶
Specifying the --insecure
option, you avoid that the certificate will be checked by the client.
plossys job <command> --insecure
User Authentication¶
Depending on the type of user authentication activated for the seal-rest
service, you have to specify the user and the password with PLOSSYS CLI. By default, the specified user is first checked via OpenID Connect and via basic authentication as fallback.
plossys job <command> --auth <auth_type> --user <user> --pass <password>
Example - show all jobs as user test
authenticated via OpenID Connect
plossys job show --auth oidc --user test --pass test
Using OpenID Connect, you can alternatively specify a JSON Web token (JWT) instead of a user and his password.
plossys job <command> --auth oidc --bearer <jwt>
Example - show all jobs as a user authenticated via JSON Web token
plossys job show --auth oidc --bearer eyJ0eXAiOiJKV1QiLCJhbG...
The credentials, that means user and password or the token, can also be contained in a credential file which is specified with PLOSSYS CLI.
plossys job <command> --auth oidc --credential <credential_file>
Commands¶
Show All Jobs¶
plossys job show
Show Specific Jobs¶
plossys job show <job_id_1> <job_id_2> ... <job_id_n>
Example - show the job with the ID b6f50fe3-1292-4d56-922f-bcd26038bb97
plossys job show b6f50fe3-1292-4d56-922f-bcd26038bb97
results in:
[
{
"_id": "b6f50fe3-1292-4d56-922f-bcd26038bb97",
"orig": {
"jobName": "Testjob@p50-roe-hp2055-001",
"printerName": "p50-roe-hp2055-001",
"userName": "test",
"fileName": "",
"copies": 1,
"checkinType": "ipp/2.0",
"server": "p5",
"pdl": {
"name": "postscript",
"version": "3.0"
},
"creator": "",
"arrivedTime": 1568280537768,
"checkinTime": 1568280537778,
"fileSize": 35266
},
"current": {
"jobName": "Testjob@p50-roe-hp2055-001",
"printerName": "p50-roe-hp2055-001",
"userName": "test",
"fileName": "",
"copies": 1,
"checkinType": "ipp/2.0",
"server": "p5",
"pdl": {
"name": "postscript",
"version": "3.0"
},
"creator": "",
"arrivedTime": 1568280537768,
"checkinTime": 1568280537778,
"fileSize": 35266
},
"refId": "b6f50fe3",
"fileName": [
"b6f50fe3-1292-4d56-922f-bcd26038bb97"
],
"status": "canceled"
}
]
Show Specific Properties of Specific Jobs¶
plossys job show <job_id_1> <job_id_2> ... <job_id_n> --fields <field_name_1>,<field_name_2>,...,<field_name_n>
Hint - field names with hierarchie
The field names have to be specified with the complete hierarchy, for example, current/jobName
.
Example - show the status and the original user name of all jobs
plossys job show --fields status,orig/userName
results in:
[
{
"_id": "5250f1e6-03f8-4525-bc22-e13fcd9cb38c",
"orig": {
"userName": "joe"
},
"status": "postponed"
},
{
"_id": "15614e36-3a8b-4e0e-9461-9a759fd42e75",
"orig": {
"userName": "jane"
},
"status": "waiting"
},
{
"_id": "fe4db59c-b397-48ac-bd59-8beb02c6a7ea",
"orig": {
"userName": "willy"
},
"status": "waiting"
},
{
"_id": "b6f50fe3-1292-4d56-922f-bcd26038bb97",
"orig": {
"userName": "test"
},
"status": "canceled"
}
]
Cancel Specific Jobs¶
plossys job cancel <job_id_1> <job_id_2> ... <job_id_n>
Delete Specific Jobs¶
plossys job remove <job_id_1> <job_id_2> ... <job_id_n>
Pause Specific Jobs¶
plossys job pause <job_id_1> <job_id_2> ... <job_id_n>
Repeat Specific Jobs¶
plossys job repeat <job_id_1> <job_id_2> ... <job_id_n>
Resume Specific Jobs¶
plossys job resume <job_id_1> <job_id_2> ... <job_id_n>
Collect the Files of a Specific Job as Zip File¶
plossys job collect <job_id>
Print a Document or a Zip file¶
plossys job print <file> --printer <printer>
Hint - graphic file
If file
is a graphic file, the --printer
option has to be specified.
The file
may also be a Zip file resulting from plossys job collect
or the correspondent operation in PLOSSYS Administrator.
In this case, the original input file in the Zip file is printed. The printer specified in the original print parameters of the Zip file (<jobID>.json
) is used unless it is overwritten by the --printer
option and the original print parameters in the Zip file (<jobID>.json
) are used.
Advanced Job Queries¶
For advanced job queries, the query
subcommand is available. The query
subcommand supports the OData language. The result of the subcommand is a list of jobs. In order to execute complex queries and operations, this list can be combined with other PLOSSYS CLI commands.
Example - list active jobs
plossys job query "status eq 'active'"
Example - pause the active jobs
plossys job query "status eq 'active'" | plossys job pause
Example - remove all jobs
The following example uses the third-party-tool jc
for parsing the JSON output of plossys job show
. This tool is usually not installed on your system and has to be installed so that the following command will work. You can download jc
from https://stedolan.github.io/jq/download/ for example.
plossys job show | jq -r .[]._id | plossys job remove -