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

Natural Periodic Scheduling: Dependency on the Previous Period

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

Introduction

The natural periods for job scheduling can be classified into the following types: minute, hour, day, week, or month. Figure 1 lists the scheduling periods that can be configured for the dependency jobs of jobs with different scheduling periods.

Figure 1 Dependency between a job and that of the previous period

The scheduling of job A depends on the previous scheduling period of job B. The following scenarios are involved.

A Minute-Level Job Depends on Another Minute-Level Job

Rule: The minute is the minimum scheduling granularity, and there is no natural minute period. The dependency policy is to find the dependency instance of the job with a longer scheduling period in the previous scheduling period.

Example: Job A depends on job B. Job A is executed every 10 minutes, and job B is executed every 15 minutes, both starting from the 0th minute of each hour. Job A depends on the instance of job B which is generated at the 45th minute of the previous hour.

A Minute-Level Job Depends on an Hourly Job

Rule: A minute-level job is executed after the previous job which is executed each calendar hour is complete.

Example: Minute-level job A depends on hourly job B. Job A is triggered every 10 minutes, and job B is executed at the 18th minute of each hour. Job A depends on the instance of job B which is generated at the 18th minute of the previous hour.

A Minute-Level Job Depends on a Daily Job

Rule: A minute-level job depends on the previous period of the daily job and can be executed only after the previous daily job is executed.

Example: Job A depends on job B. Job A is executed every five minutes, and job B is executed at 02:30 every day. Job A depends on the instance of job B after 02:30 on the previous day.

An Hourly Job Depends on a Minute-Level Job

Rule: An hourly job depends on a minute-level job. The minute-level job instances within the last natural hour are executed (excluding the start time of the previous hour and including the start time of the current hour).

Example 1: Job A is an hourly job and is executed at the 0th minute of each hour. Job B is executed every 15 minutes. Job A depends on the instances of job B which are generated at the 45th minute of the previous hour.

An Hourly Job Depends on Another Hourly Job

Rule: Instances in each calendar hour depend on each other. The range boundary is [00:00, 00:59]. The dependency policy is to find dependency instances from the previous scheduling period of a job with a long scheduling period.

Job A depends on job B. In the same calendar hour, job A is always executed after job B is executed in the previous period.

Example: Job A is executed at the fifth minute of each hour and job B is executed at the 12th minute. Job A depends on the instance generated in the previous hour at the fifth minute of each hour.

An Hourly Job Depends on a Daily Job

Rule: An hourly job which depends on a daily job is executed only after the daily job is executed in the previous period.

Example: Job A depends on job B. If job A is executed at the top of each hour, and job B is executed at 02:30, job A depends on the instance of job B at 02:30 on the previous day.

A Daily Job Depends on a Minute-Level Job

Rule: Instances of a daily job depend on the instances of the minute-level jobs on the previous day.

Example: Job A is a daily job and depends on job B (minute-level). Job A depends on the last instance of job B on the previous day. Job A is executed after the last instance of job B is executed.

A Daily Job Depends on an Hourly Job

Rule: Instances of a daily job depend on the instances of an hourly job on the previous day.

Example: Job A is a daily job and depends on hourly job B. Job A depends on the instance of job B which is generated in the last period of the previous day.

A Daily Job Depends on Another Daily Job

Rule: A job depends on the instance of the previous period of a job which is scheduled every calendar day. If job A depends on job B within the same calendar day, job A always depends on the instance of job B in the previous period regardless of the execution time configured for job A and job B. The day range is [00:00:00,23:59:59].

Example: If job A is executed at 02:00 and job B is executed at 03:00, job A depends on the instance of job B executed at 03:00 in the previous period and is executed at 02:00 in the current period.

A Daily Job Depends on a Weekly Job

Rule: A daily job depends on a weekly job executed on the previous day. If the weekly job is not executed on the previous day, the daily job is directly executed. If the weekly job is executed on the previous day, the daily job will be executed after the weekly job is executed.

Example 1: Job A depends on job B. Job A is executed every day, and job B is executed every Wednesday. If the day before the day when job A is scheduled to be executed is not Wednesday, job B is not executed, and job A is directly executed.

Example 2: Job A depends on job B. Job A is executed every day, and job B is executed every Wednesday. If the day before the day when job A is scheduled to be executed is Wednesday, job B is executed, and job A is executed after job B is executed.

A Daily Job Depends on a Monthly Job

Rule: A daily job which depends on a monthly job is executed only after the monthly job is executed in the previous period .

Example: Job A depends on job B. Job A is executed once a day, and job B is executed once on the 15th day of each month. The execution of job A depends on the running instance of job B on the 15th day of the previous month.

A Weekly Job Depends on an Hourly Job

Rule: On a calendar day from 00:00 of the previous day (included) to 00:00 of the current day (excluded), weekly job A is executed after the tasks of hourly job B are executed.

Example: Job A depends on job B. Job A is scheduled every Monday, and job B is executed at the 50th minute of each hour. Job A is executed after the last task of job B is executed at 23:50 on last Sunday and an instance is generated.

A Weekly Job Depends on a Daily Job

Rule: A weekly job can be executed only after the daily job of the previous day is complete.

Example: Job A depends on job B. Job B is executed once everyday, and job A is executed once on every Monday. The execution of job A depends on the running instances of job B on the previous day.

A Weekly Job Depends on Another Weekly Job

Rule: A weekly job which depends on a weekly job of the previous day can be executed only after the weekly job of the previous day is complete. If there is no instance for the previous day, no dependency is required.

Example: Job A depends on job B. Job B is executed once on every Monday, and job A is executed once on every Tuesday. The execution of job A depends on the running instances of job B on every Monday.

A Weekly Job Depends on a Monthly Job

Rule: A weekly job depends on a monthly job executed on the previous day. If the monthly job is not executed on the previous day, the weekly job is directly executed. If the monthly job is executed on the previous day, the weekly job will be executed after the monthly job is executed.

Example 1: Job A depends on job B. Job A is executed every Wednesday, and job B is executed on the 10th day of each month. If the day before the day when job A is scheduled to be executed is the 10th day of a month, job A will be executed after job B is executed.

Example 2: Job A depends on job B. Job A is executed every Wednesday, and job B is executed on the 10th day of each month. If the previous day of the day when job A is scheduled to be executed is not the 10th day of a month, job A will be directly executed.

A Monthly Job Depends on a Daily Job

Rule: A monthly job can be executed only after the daily job of the previous day is complete.

Example: Job A depends on job B. Job B is executed once every day, and job A is executed once every month. The execution of job A depends on the running instances of job B on the previous day.

A Monthly Job Depends on a Weekly Job

Rule: A monthly job depends on a weekly job executed on the previous day. If the weekly job is not executed on the previous day, the monthly job is directly executed. If the weekly job is executed on the previous day, the monthly job will be executed after the weekly job is executed.

Example 1: Job A depends on job B. Job A is executed on the 10th day of each month, and job B is executed every Wednesday. If the day before the day when job A is scheduled to be executed is not Wednesday, job B is not executed, and job A is directly executed.

Example 2: Job A depends on job B. Job A is executed on the 10th day of each month, and job B is executed every Wednesday. If the day before the day when job A is scheduled to be executed is Wednesday, job B is executed, and job A is executed after job B is executed.

A Monthly Job Depends on Another Monthly Job

Rule: A monthly job depends on another monthly job executed on the previous day. If the depended monthly job is executed after the dependent job, the dependent job is executed properly. Except that, the dependency relationship works.

Example 1: Job A depends on job B. Job A is executed on the first day of each month, and job B is executed on the second day of each month. On the first day of a month, job A is executed normally without being blocked by job B.

Example 2: Job A depends on job B. Job A and job B are both executed on the second day of each month. Job A depends on the instance that is generated after job B is executed.

Example 3: Job A is executed on the third day of each month, and job B is executed on the second day of each month. Job A depends on job B.

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