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
Situation Awareness
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
Help Center/ DataArts Studio/ Best Practices/ Advanced Data Development Guidance/ Scheduling by Discrete Hours and Scheduling by the Nearest Job Instance

Scheduling by Discrete Hours and Scheduling by the Nearest Job Instance

Updated on 2024-08-30 GMT+08:00

Currently, DataArts Factory supports two types of job dependency policies, that is, dependency between jobs whose scheduling periods are traditional periods and dependency between jobs whose scheduling periods are natural periods.

For details about the dependency between jobs whose scheduling periods are traditional periods, see Traditional Periodic Scheduling.

For details about the dependency between jobs whose scheduling periods are natural periods, see Natural Periodic Scheduling.

Now many new rules are available for natural periodic scheduling, such as scheduling by discrete hours and scheduling by the nearest job instance. This section describes the two scheduling rules in detail.

Scheduling by Discrete Hours

Scenario 1: Jobs scheduled by discrete hours depend on all monthly, weekly, and daily jobs within calendar days, or the other way round.

Table 1 Dependency logic 1 for jobs scheduled by discrete hours

Scenario

Dependency Processing Logic

A job scheduled by discrete hours depends on a monthly job.

Check whether the job instances from 00:00 on the current day (included) to 00:00 on the next day (excluded) are successfully executed.

Example 1: Job A is scheduled at 02:00, 05:00, and 15:00. Job B is scheduled at 12:00 on the third day of each month. Job A depends on job B. If the current day is the third day of a month, the instances generated for job A at 02:00, 05:00, and 15:00 are executed only after the instance generated for job B at 12:00 is successfully executed.

Example 2: Job A is scheduled at 02:00, 05:00, and 15:00. Job B is scheduled at 12:00 on the third day of each month. Job A depends on job B. If the current day is not the third day of a month, no instance is generated for job B, and the instances generated for job A at 02:00, 05:00, and 15:00 are directly executed.

A monthly job depends on a job scheduled by discrete hours.

Check whether the job instances from 00:00 on the current day (included) to 00:00 on the next day (excluded) are successfully executed.

Example: Job A is scheduled at 02:00, 05:00, and 15:00. Job B is scheduled at 12:00 on the third day of each month. Job B depends on job A. When job B is scheduled on the third day of a month, the instance generated for it at 12:00 is scheduled only after the instances generated for job A at 02:00, 05:00, and 15:00 are successfully executed.

A job scheduled by discrete hours depends on a weekly job.

Check whether the job instances from 00:00 on the current day (included) to 00:00 on the next day (excluded) are successfully executed.

Example 1: Job A is scheduled at 02:00, 05:00, and 15:00. Job B is scheduled at 12:00 on every Monday. Job A depends on job B. If the current day is Monday, the instances generated for job A at 02:00, 05:00, and 15:00 are executed only after the instance generated for job B at 12:00 is successfully executed.

Example 2: Job A is scheduled at 02:00, 05:00, and 15:00. Job B is scheduled at 12:00 on every Monday. Job A depends on job B. If the current day is not Monday, no instance is generated for job B, and the instances generated for job A at 02:00, 05:00, and 15:00 are directly executed.

A weekly job depends on a job scheduled by discrete hours.

Check whether the job instances from 00:00 on the current day (included) to 00:00 on the next day (excluded) are successfully executed.

Example: Job A is scheduled at 02:00, 05:00, and 15:00. Job B is scheduled at 12:00 on every Monday. Job B depends on job A. When job B is scheduled on Monday, the instance generated for it at 12:00 is scheduled only after the instances generated for job A at 02:00, 05:00, and 15:00 are successfully executed.

A job scheduled by discrete hours depends on a daily job.

Check whether the job instances from 00:00 on the current day (included) to 00:00 on the next day (excluded) are successfully executed.

Example: Job A is scheduled at 02:00, 05:00, and 15:00. Job B is scheduled at 12:00 every day. Job A depends on job B. The instances generated for job A at 02:00, 05:00, and 15:00 are executed only after the instance generated for job B at 12:00 is successfully executed.

A daily job depends on a job scheduled by discrete hours.

Check whether the job instances from 00:00 on the current day (included) to 00:00 on the next day (excluded) are successfully executed.

Example: Job A is scheduled at 02:00, 05:00, and 15:00. Job B is scheduled at 12:00 every day. Job B depends on job A. The instance generated for job B at 12:00 is scheduled only after the instances generated for job A at 02:00, 05:00, and 15:00 are successfully executed.

Scenario 2: Jobs scheduled by discrete hours depend on hourly or minute-level jobs or jobs scheduled by discrete hours, or hourly or minute-level jobs depend on jobs scheduled by discrete hours. The dependency rules are as follows:

  • Rule 1: If the number of upstream and downstream tasks in the dependency relationship is the same within a calendar day, each downstream instance depends on one upstream instance.

    For example, job A depends on job B. Job A is scheduled at 03:00, 06:00, and 08:00 every day, so three instances are generated for job A in a day. Job B is scheduled every eight hours at 00:00, 08:00, and 16:00 every day, so three instances are generated for job B in a day.

    Each instance of job A (downstream) depends on an instance of job B (upstream).

    The instance generated for job A at 03:00 depends on the instance generated for job B at 00:00. The instance generated for job A at 06:00 depends on the instance generated for job B at 08:00. The instance generated for job A at 08:00 depends on the instance generated for job B at 16:00.

  • Rule 2: If the number of upstream tasks is inconsistent with that of downstream tasks in a calendar day, a periodic instance generated on the day when a downstream task runs depends on the upstream instance that is closest to the scheduling time of the periodic instance.

    The periodic instance may depend on the upstream instances in an entire time range before the periodic instance's scheduling time or the nearest instance after the periodic instance's scheduling time.

    The following figure shows an example of how the periodic instance depends on the upstream instances in an entire time range before the periodic instance's scheduling time.

    Figure 1 The periodic instance depends on the upstream instances in an entire time range before the periodic instance's scheduling time

    The following figure shows an example of how the periodic instance depends on the nearest instance after the periodic instance's scheduling time.

    Figure 2 The periodic instance depends on the nearest instance after the periodic instance's scheduling time
Table 2 Dependency logic 2 for jobs scheduled by discrete hours

Scenario

Dependency Processing Logic

A job scheduled by discrete hours depends on an hourly job.

The dependency time range is 00:00 of the current day (included) to 00:00 of the next day (excluded). Job A is scheduled by discrete hours and depends on hourly job B.

If job A and job B have the same number of instances in a day, each instance of job A depends on an instance of job B.

If the number of instances of job A is different from that of job B in a day, each instance of job A depends on the upstream instances in an entire range before the instance's scheduling time, or depends on the nearest instance after the instance's scheduling time.

An hourly job depends on a job scheduled by discrete hours.

The dependency time range is 00:00 of the current day (included) to 00:00 of the next day (excluded). Job A is an hourly job and depends on job B which is scheduled by discrete hours.

If job A and job B have the same number of instances in a day, each instance of job A depends on an instance of job B.

If the number of instances of job A is different from that of job B in a day, each instance of job A depends on the upstream instances in an entire range before the instance's scheduling time, or depends on the nearest instance after the instance's scheduling time.

A job scheduled by discrete hours depends on a minute-level job.

The dependency time range is 00:00 of the current day (included) to 00:00 of the next day (excluded). Job A is scheduled by discrete hours and depends on minute-level job B.

If job A and job B have the same number of instances in a day, each instance of job A depends on an instance of job B.

If the number of instances of job A is different from that of job B in a day, each instance of job A depends on the upstream instances in an entire range before the instance's scheduling time, or depends on the nearest instance after the instance's scheduling time.

A minute-level job depends on a job scheduled by discrete hours.

The dependency time range is 00:00 of the current day (included) to 00:00 of the next day (excluded). Job A is a minute-level job and depends on job B which is scheduled by discrete hours.

If job A and job B have the same number of instances in a day, each instance of job A depends on an instance of job B.

If the number of instances of job A is different from that of job B in a day, each instance of job A depends on the upstream instances in an entire range before the instance's scheduling time, or depends on the nearest instance after the instance's scheduling time.

A job scheduled by discrete hours depends on another job scheduled by discrete hours.

The dependency time range is 00:00 of the current day (included) to 00:00 of the next day (excluded). Job A is a job scheduled by discrete hours and depends on job B which is also scheduled by discrete hours.

If job A and job B have the same number of instances in a day, each instance of job A depends on an instance of job B.

If the number of instances of job A is different from that of job B in a day, each instance of job A depends on the upstream instances in an entire range before the instance's scheduling time, or depends on the nearest instance after the instance's scheduling time.

Scheduling by the Nearest Job Instance

This function allows you to choose the nearest job instance in the following dependency scenarios: a daily job depends on an hour job; a daily job depends on a minute-level job; an hourly job depends on a minute-level job.

Table 3 Scheduling by the nearest job instance

Scenario

Dependency Processing Logic

A daily job depends on an hourly job (depends on the latest instance).

The dependency time range is 00:00 of the current day (included) to 00:00 of the next day (excluded) and cannot cross days.

Example 1: Job A is scheduled at 08:00 every day, and job B is scheduled at the 15th minute of every hour. In this case, job A depends on the latest instance of job B, that is, the instance generated at 07:15.

Example 2: Job A is scheduled at 00:30 every day, and job B is scheduled at the 40th minute of every hour. There is no instance generated for job B before job A starts every day, so job A does not depend on any instance of job B, and is executed directly.

A daily job depends on a minute-level job (depends on the latest instance).

The dependency time range is 00:00 of the current day (included) to 00:00 of the next day (excluded) and cannot cross days.

An hourly job depends on a minute-level job (depends on the latest instance).

An instance of the hourly job depends on the latest instance of the minute-level job generated before the instance of the hourly job is generated.

Example: Job A is scheduled at the 15th minute of every hour, and job B is scheduled every 15 minutes from 01:00. The instance of job A generated at 00:15 depends on the instance of job B generated at 23:45 on the previous day. The instance of job A generated at 01:15 depends on the instance of job B generated at 01:15 on the current day.

We use cookies to improve our site and your experience. By continuing to browse our site you accept our cookie policy. Find out more

Feedback

Feedback

Feedback

0/500

Selected Content

Submit selected content with the feedback