Tsuru job create
tsuru job create¶
Creates a new job using the given name and platform
Synopsis¶
Creates a new job using the given name and platform
In order to create an job, you need to be member of at least one team. All teams that you are member (see [[tsuru team-list]]) will be able to access the job
The [[--plan]] parameter defines the plan to be used. The plan specifies how computational resources are allocated to your job execution. Typically this means limits for cpu and memory usage is allocated. The list of available plans can be found running [[tsuru plan list]]
If this parameter is not informed, tsuru will choose the plan with the [[default]] flag set to true
The [[--schedule]] parameter defines how often this job will be executed. This string follows the unix-cron format, if you need to test the cron expressions visit the site: https://crontab.guru/
The [[--team]] parameter describes which team is responsible for the created app, this is only needed if the current user belongs to more than one team, in which case this parameter will be mandatory
The [[--pool]] parameter defines which pool your app will be deployed. This is only needed if you have more than one pool associated with your teams
The [[--description]] parameter sets a description for your job. It is an optional parameter, and if its not set the job will only not have a description associated
The [[--manual]] parameter sets your job as a manual job.
A manual job is only run when explicitly triggered by the user i.e: tsuru job trigger
The [[--tag]] parameter sets a tag to your job. You can set multiple [[--tag]] parameters
The [[--max-running-time]] sets maximum amount of time (in seconds) that the job can run. If the job exceeds this limit, it will be automatically stopped. If this parameter is not informed, default value is 3600s
tsuru job create <jobname> <image> "<commands>" [--plan/-p plan name] [--schedule/-s schedule name] [--team/-t team owner] [--pool/-o pool name] [--description/-d description] [--tag/-g tag] [--max-running-time/-m seconds] [--manual bool]... [flags]
Options¶
-p, --plan string The plan used to create the job
-s, --schedule string Schedule string
-t, --team string Team owner job
-o, --pool string Pool to deploy your job
-d, --description string Job description
-g, --tag string Job tag
--manual Manual job
-m, --max-running-time int Maximum running time in seconds for the job
-h, --help help for create
Options inherited from parent commands¶
--target string Tsuru server endpoint
--verbosity int Verbosity level: 1 => print HTTP requests; 2 => print HTTP requests/responses
SEE ALSO¶
- tsuru job - Job is a program that runs on a schedule or is executed manually