El contenido no se encuentra disponible en el idioma seleccionado. Estamos trabajando continuamente para agregar más idiomas. Gracias por su apoyo.

Compute
Elastic Cloud Server
Huawei Cloud Flexus
Bare Metal Server
Auto Scaling
Image Management Service
Dedicated Host
FunctionGraph
Cloud Phone Host
Huawei Cloud EulerOS
Networking
Virtual Private Cloud
Elastic IP
Elastic Load Balance
NAT Gateway
Direct Connect
Virtual Private Network
VPC Endpoint
Cloud Connect
Enterprise Router
Enterprise Switch
Global Accelerator
Management & Governance
Cloud Eye
Identity and Access Management
Cloud Trace Service
Resource Formation Service
Tag Management Service
Log Tank Service
Config
OneAccess
Resource Access Manager
Simple Message Notification
Application Performance Management
Application Operations Management
Organizations
Optimization Advisor
IAM Identity Center
Cloud Operations Center
Resource Governance Center
Migration
Server Migration Service
Object Storage Migration Service
Cloud Data Migration
Migration Center
Cloud Ecosystem
KooGallery
Partner Center
User Support
My Account
Billing Center
Cost Center
Resource Center
Enterprise Management
Service Tickets
HUAWEI CLOUD (International) FAQs
ICP Filing
Support Plans
My Credentials
Customer Operation Capabilities
Partner Support Plans
Professional Services
Analytics
MapReduce Service
Data Lake Insight
CloudTable Service
Cloud Search Service
Data Lake Visualization
Data Ingestion Service
GaussDB(DWS)
DataArts Studio
Data Lake Factory
DataArts Lake Formation
IoT
IoT Device Access
Others
Product Pricing Details
System Permissions
Console Quick Start
Common FAQs
Instructions for Associating with a HUAWEI CLOUD Partner
Message Center
Security & Compliance
Security Technologies and Applications
Web Application Firewall
Host Security Service
Cloud Firewall
SecMaster
Anti-DDoS Service
Data Encryption Workshop
Database Security Service
Cloud Bastion Host
Data Security Center
Cloud Certificate Manager
Edge Security
Managed Threat Detection
Blockchain
Blockchain Service
Web3 Node Engine Service
Media Services
Media Processing Center
Video On Demand
Live
SparkRTC
MetaStudio
Storage
Object Storage Service
Elastic Volume Service
Cloud Backup and Recovery
Storage Disaster Recovery Service
Scalable File Service Turbo
Scalable File Service
Volume Backup Service
Cloud Server Backup Service
Data Express Service
Dedicated Distributed Storage Service
Containers
Cloud Container Engine
SoftWare Repository for Container
Application Service Mesh
Ubiquitous Cloud Native Service
Cloud Container Instance
Databases
Relational Database Service
Document Database Service
Data Admin Service
Data Replication Service
GeminiDB
GaussDB
Distributed Database Middleware
Database and Application Migration UGO
TaurusDB
Middleware
Distributed Cache Service
API Gateway
Distributed Message Service for Kafka
Distributed Message Service for RabbitMQ
Distributed Message Service for RocketMQ
Cloud Service Engine
Multi-Site High Availability Service
EventGrid
Dedicated Cloud
Dedicated Computing Cluster
Business Applications
Workspace
ROMA Connect
Message & SMS
Domain Name Service
Edge Data Center Management
Meeting
AI
Face Recognition Service
Graph Engine Service
Content Moderation
Image Recognition
Optical Character Recognition
ModelArts
ImageSearch
Conversational Bot Service
Speech Interaction Service
Huawei HiLens
Video Intelligent Analysis Service
Developer Tools
SDK Developer Guide
API Request Signing Guide
Terraform
Koo Command Line Interface
Content Delivery & Edge Computing
Content Delivery Network
Intelligent EdgeFabric
CloudPond
Intelligent EdgeCloud
Solutions
SAP Cloud
High Performance Computing
Developer Services
ServiceStage
CodeArts
CodeArts PerfTest
CodeArts Req
CodeArts Pipeline
CodeArts Build
CodeArts Deploy
CodeArts Artifact
CodeArts TestPlan
CodeArts Check
CodeArts Repo
Cloud Application Engine
MacroVerse aPaaS
KooMessage
KooPhone
KooDrive

Simple Variable Set

Updated on 2024-04-03 GMT+08:00

The simple variable set provides a series of customized variables. Customized parameters are automatically replaced with specific values based on the service date, plan time, and parameter value format of task scheduling. In this way, parameters can be dynamically replaced during task scheduling.

Currently, the system supports the customization of three types of parameters: service date, plan time, and service ID.

  • The business date refers to the day before the expected scheduling running time of a task within the scheduling time, that is, yesterday. The business date is accurate to day. You can obtain the service date from ${yyyymmdd}. Generally, the service date is the date when the plan time is located minus 1.
  • The plan time refers to the time point (that is, the current day) when a task is expected to be scheduled within the scheduling time. The plan time is accurate to seconds. The planned time can be obtained through $[yyyymmddhh24miss].
  • The service ID parameter includes the job ID and the instance ID generated by the job, which can be obtained through $job_id and $instance_id.
    NOTICE:

    To use simple variable sets, you must enable this function by referring to Configuring a Default Item > Use Simple Variable Set.

Service Date Parameter

The service date refers to the day before the expected scheduling running time of a task within the scheduling time, that is, yesterday. For example, if the scheduling date is January 1, 2023, the service date is December 31, 2022. This parameter is a time parameter generated based on the combination of yyyy, yy, mm, and dd. The format of this parameter can be customized. for example, ${yyyy}, ${yyyymm}, ${yyyymmdd}, and ${yyyy-mm-dd}.

  • yyyy: indicates a 4-digit year. The value is the year of the service date.
  • yy: indicates a 2-digit year. The value is the last two digits of the year of the service date.
  • mm: indicates the month. The value is the month of the service date.
  • dd: indicates the day. The value is the day of the service date.

For details about how to obtain the time data N years ago, N months ago, and N days ago, see Table 1. The parameter can only be accurate to year, month, and day. The hour, minute, and second formats are not supported.

Table 1 Parameters for obtaining the service date

Business Date Scenario

Method

Previous/Next N Years

${yyyy±N}

Previous/Next N Months

${yyyymm±N}

N weeks before/after

${yyyymmdd±7*N}

N days before/after

${yyyymmdd±N}

N years before/after (yy format)

${yy±N}

Plan Time Parameters

The planned time refers to the time when a task is expected to be scheduled and run within the scheduling time (that is, the current day). This parameter is a time parameter generated based on the combination of yyyy, yy, mm, dd, hh24, mi, and ss. The format of this parameter can be customized. For example, $[yyyymmdd], $[yyyy-mm-dd], $[hh24miss], $[hh24:mi:ss], and $[yyyymmddhh24miss].

  • yyyy: indicates a 4-digit year. The value is the year of the plan time.
  • yy: indicates a two-digit year. The value is the last two digits of the year of the plan time.
  • mm: indicates the month. The value is the month of the plan time.
  • dd: indicates the day. The value is the day of the plan time.
  • hh: indicates the 12-hour format. The value is the hour of the plan time.
  • hh24: indicates the 24-hour format. The value is the hour of the plan time.
  • mi: indicates the minute. The value is the minute of the plan time.
  • ss: indicates the second. The value is the second of the plan time.

For details about how to obtain data N hours and minutes ago, see Table 2. This parameter cannot be used to obtain data N years and months ago using $[yyyy-N] or $[mm-N].

Table 2 Parameters for obtaining the plan time

Planned Time Scenario

Method

Next N Years

$[add_months(yyyymmdd,12*N)]

First N Years

$[add_months(yyyymmdd,-12*N)]

Last N Months

$[add_months(yyyymmdd,N)]

Last N Months

$[add_months(yyyymmdd,-N)]

N weeks before/after

$[yyyymmdd±7*N]

N days before/after

$[yyyymmdd±N]

Before/After N Hours

You can obtain the time data in either of the following ways:

  • $[hh24miss±N/24]
  • $[User-defined time format ±N/24].

    For example, to obtain the time format of the previous hour, run the following command:

    • Month: $[mm-1/24].
    • Year: $[yyyy-1/24].
    • Year and month: $[yyyymm-1/24].
    • Obtain the year, month, and day: $[yyyymmdd-1/24].
    • $[yyyymmdd-1-1/24]: indicates that the time of the previous day and the previous hour is used.

Before/After N minutes

You can obtain the time data in any of the following ways:

  • $[hh24miss±N/24/60]
  • $[yyyymmddhh24miss±N/24/60]
  • $[mi±N/24/60]
  • $[User-defined time format ±N/24/60]

    For example, to obtain the time format 15 minutes before the planned time, run the following command:

    • Year: $[yyyy-15/24/60]
    • Year and month: $[yyyymm-15/24/60]
    • Date: $[yyyymmdd-15/24/60]
    • Hour: $[hh24-15/24/60]
    • Minute: $[mi-15/24/60]
NOTE:
  • The replacement value of the scheduling parameter is determined when the instance is generated. Therefore, the replacement value of the scheduling parameter does not change with the actual running time of the instance.
  • When the scheduling parameter is set to hour or minute, the parameter replacement value is determined by the planned scheduling time of the instance, that is, the planned scheduling time configured for the node scheduling. For example:
    • If the current node is a daily scheduling node and the planned scheduling time is 01:00, the value of Hour is 01.
    • If the current node is an hourly scheduling node, the planned scheduling time is set to 00:00-23:59, and the scheduling is performed every hour, the planned time of the first hourly instance is 00:00, and the value of the hour parameter is 00. The planned time of the second hourly instance is 01, and so on.

Service Parameters

The service ID is replaced with the actual ID of the current service, including the job ID and the instance ID generated by the job.

Table 3 Parameters for obtaining the service ID

Methods

Description

$job_id

Data Development Job ID For details about how to obtain the ID, see Viewing Job Details.

$instance_id

Job instance ID. (The instance ID is not generated during the test running of a single-node job and is not supported.) For details about how to obtain the ID, see Viewing a Job Instance List.

Utilizamos cookies para mejorar nuestro sitio y tu experiencia. Al continuar navegando en nuestro sitio, tú aceptas nuestra política de cookies. Descubre más

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback