Create ScheduleJob

create a schedule job

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Creating a job

📘

Supported jobs

Only PySpark and Python are supported for job creation via API. To create a BigQuery scheduled job, use Google BigQuery. Once created, the BigQuery scheduled job will be synchronized with LiveRamp within 15 minutes.

Before you create a job, do the following:

  • Create a Python code files in your code repository bucket that you want to run and note its path so that you can specify it with the mainFile parameter.
  • Decide when the job should run and at what interval (specify startDate, frequency + a cron expression, and timeZone). If you want to run the job immediately, specify onetimeJob: true.
  • (Optional) If you want to use any of the supported Python packages, verify the correct syntax.

Request example for Python or Pyspark

curl --location 'https://api.liveramp.com/analytics-environment/v1/schedule-jobs' \
--header 'Tenant-ID: ${tenantId}' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer ${access_token}' \
--data-raw '{
  "name": "test",
  "description": "test",
  "jobType": "PySpark",
  "clusterType": "Large",
  "dataprocVersion": "dataproc2.1",
  "mainFile": "gs://lranalytics-eu-123456-cert-awob-coderepo/testFolder01/111.py",
   "pyFiles": [
    "gs://lranalytics-eu-123456-cert-awob-coderepo/1.py"
  ],
  "enabled": true,
  "jobArgs": "",
  "additionalPackages": "",
  "onetimeJob": false,
  "startDate": "",
  "frequency": "25 0 * * 2",
  "timeZone": "Asia/Shanghai",

  "emailAlert": "failed",
  "tenantId": 123456,
  "userEmail": "[email protected]"
}'


For information on how this is done in Analytics Environment's user interface, see "Create a Job" in the Safe Haven help.

Body Params
int32
required

tenant id

string
required

type of job resource:(Small|Medium|Large|X-Large|XX-Large)

string
required

Scheduled job type. Only supports PySpark and Python

string
required

job name

string
required

description for this job

string
required

Code file to run in scheduled job. Can get files by calling Get Multiple BlobTrees api.

string
required

cron expression. Example: 25 0 * * 2

boolean
required

Whether onetime job

string
required

time zone

string

args for job execution,Example: Arg1,Arg2,Arg3 ...

pyFiles
array of strings

Additional files for schedule jobs. Can get files by calling Get Multiple BlobTrees api.

pyFiles
string

The version of Python being used. Default value is version "3.8". Versions "3.10" and "3.11" can also be used.

boolean
Defaults to true

Default value is True. If set up to false, will disable the job.

string

The python packages the job depends on. Only needed when jobType value is Python. Example: pandas==0.23.0 scipy==1.1.0

string

Only required when job is onetimeJob. Example: 2023-12-06 00:00:00

string

Dataproc imager version. Can get it by calling Get dataproc image versions api. Only required when jobType value is PySpark

string
Defaults to failed

the email alert configuration

string

userEmail: When search jobs, it’s not for filter. if not null, will return the user’s email alert in job detail.

Headers
string
required
Response

Language
LoadingLoading…
Response
Choose an example:
application/json