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
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
Help Center/ ROMA Connect/ User Guide/ Data Integration Guide/ Managing a Data Integration Task/ Appendix: Quartz Cron Expression Configuration

Appendix: Quartz Cron Expression Configuration

Updated on 2024-11-27 GMT+08:00

Parameter Description

Quartz cron expressions can be used to schedule data integration tasks.

A Quartz cron expression contains six fields separated by space, in the following format.

Second Minute Hour Day Month Week

Table 1 describes the parameters.

Table 1 Quartz cron parameters

Name

Mandatory

Optional Value

Optional Special Character

Second

No

To be supported

Fixed at 0

-

Minute

Yes

0–59

, - * /

Hour

Yes

0–23

, - * /

Day

Yes

Day of a month, ranging from 1 to 31. Note that there are no 30 and 31 in February, and there is no 31 in April, June, September, and November.

, - * ? / L W

Month

Yes

1–12 or a character string. For the mapping between numbers and character strings, see Table 2.

Example: Enter 1 or JAN if you want to specify January.

, - * /

Week

Yes

1–7 or a character string. For details about the mapping between numbers and character strings, see Table 3. In Quartz cron expressions, Saturday is the last day of a week.

Example: Enter 2 or MON if you want to specify Monday.

, - * ? / L #

Table 2 Mapping between numbers and character strings for the month

Number

String

1

JAN

2

FEB

3

MAR

4

APR

5

MAY

6

JUN

7

JUL

8

AUG

9

SEP

10

OCT

11

NOV

12

DEC

Table 3 Mapping between numbers and character strings for the week

Number

String

Description

1

SUN

Sunday

2

MON

Monday

3

TUE

Tuesday

4

WED

Wednesday

5

THU

Thursday

6

FRI

Friday

7

SAT

Saturday

Precautions

Each parameter value is a number, but the following special characters can also be used:

  • *: It can match any value of a field. If * is used in the minutes field, an event is triggered every minute.
  • ?: It can only be used in two fields: day (day in each month) and week. It can also match any value of the field, but actually it does not. This is because day (day in each month) and week are mutually affected. For example, if you want to trigger scheduling on the 20th day of each month, you can use the following expression: 13 13 15 20 * ?, where the last digit can only be ?, but not *. If you use *, an event will be triggered regardless of the day of week.
  • -: It specifies a range. For example, 5-20 in the minutes field means that an event is triggered every minute from minutes 5-20.
  • /: An event is triggered from the specified time and at a fixed interval. For example, if you set the minutes field to 5/20, it means that the scheduled task will be triggered at the 5th, 25th, and 45th minutes of each hour.
  • ,: It specifies a list value. For example, if you set the minutes field to 5,20, it means that the scheduled task will be triggered every minute between minutes 5 and 20 of each hour.
  • L: It indicates "last". It can appear only in the day (day in each month) and week fields. For example, 5L in the week field means that a task is triggered on the last Thursday of the month.
  • W: It indicates the weekday (Monday to Friday) nearest the given day. It can appear only in the day (day of month) field. For example, 5W in the day (day of month) field means that a task is triggered on the nearest weekday to the 5th day of the month. If the 5th day is Saturday, the task is triggered on the 4th day (Friday). If the 5th day is Sunday, the task is triggered on the 6th day (Monday). If the 5th day is one day from Monday to Friday, an event is triggered on the 5th day. The trigger will not jump over the boundary of a month's days.
  • LW: The two characters indicate the last weekday of a month, that is, the last Friday.
  • #: It indicates the nth day of a week every month. It can appear only in the day (day of month) field. For example, 4#2 indicates the second Wednesday of a month.

When configuring the Quartz Cron expression for a scheduled task, pay attention to the following::

Quartz Cron uses UTC+0. Convert local time to UTC+0. For example, China is UTC+8, so to run a daily task at 20:00 China time, subtract 8 hours. The Quartz Cron is 0 12 * * ?.

Configuration Example

The following examples show you how to use Quartz cron expressions.

Simple examples:
0 0/1 * * * ? //Executed every one minute
0 0 23 * * ? //Executed at 23:00 every day
0 0 1 1 * ? //Executed at 01:00 on the first day of each month
0 0 23 L * ? //Executed at 23:00 on the last day of each month
0 33,55 * * * ? //Executed at the 33th and 55th minute
0 0 18 * * LW //Executed at 06:00 on the last weekday of each month
Common examples:
0 0 12 * * ? //Executed at 12:00 every day
0 * 14 * * ? //Executed every minute from 02:00 to 02:59 every day
0 0/30 9-19 * *? //Executed every half an hour from 9:00 a.m. to 19:59 p.m.
0 0 12 ? * WED //Executed at 12:00 every Wednesday
0 0/30 9-19 * * MON-FRI //Executed every half an hour from 09:00 to 19:59 every day from Monday to Friday
0 15 10 ? * MON-FRI //Executed at 10:15 every day from Monday to Friday
0 0 2 1 * ? //Executed at 02:00 on the first day of each month
0 15 10 ? * 6#3 //Executed at 10:15 on the third Friday of each month
0 15 10 ? * 6L //Executed at 10:15 on the last Friday of each month

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