tencent cloud

Serverless Cloud Function

Release Notes and Announcements
Release Notes
Announcements
User Guide
Product Introduction
Overview
Related Concepts
How It Works
Strengths
Scenarios
Related Products
Purchase Guide
Billing Overview
Billing Mode
Billable Items and Billing Modes
Function Computing Power Support
Free Tier
SCF Pricing
Billing Example
Payment Overdue
Getting Started
Creating Event Function in Console
User Guide
Quota Management
Managing Functions
Web Function Management
Log Management
Concurrence Management
Trigger Management
Function URL
A Custom Domain Name
Version Management
Alias Management
Permission Management
Running Instance Management
Plugin Management
Managing Monitors and Alarms
Network Configuration
Layer Management
Execution Configuration
Extended Storage Management
DNS Caching Configuration
Resource Managed Mode Management
Near-Offline Resource Hosting Model
Workflow
Triggers
Trigger Overview
Trigger Event Message Structure Summary
API Gateway Trigger
COS Trigger
CLS Trigger
Timer Trigger
CKafka Trigger
Apache Kafka Trigger
MQTT Trigger
Trigger Configuration Description
MPS Trigger
CLB Trigger Description
TencentCloud API Trigger
Development Guide
Basic Concepts
Testing a Function
Environment Variables
Dependency Installation
Using Container Image
Error Types and Retry Policies
Dead Letter Queue
Connecting SCF to Database
Automated Deployment
Cloud Function Status Code
Common Errors and Solutions
Developer Tools
Serverless Web IDE
Calling SDK Across Functions
Third-Party Tools
Code Development
Python
Node.js
Golang
PHP
Java
Custom Runtime
Deploying Image as Function
Web Framework Development
Deploying Framework on Command Line
Quickly Deploying Egg Framework
Quickly Deploying Express Framework
Quickly Deploying Flask Framework
Quickly Deploying Koa Framework
Quickly Deploying Laravel Framework
Quickly Deploying Nest.js Framework
Quickly Deploying Next.js Framework
Quickly Deploying Nuxt.js Framework
Quickly Deploying Django Framework
Use Cases
Overview
Solutions with Tencent Cloud Services
Business Development
TRTC Practices
COS Practices
CKafka Practice
CLS
CLB Practice
MPS
CDN
CDWPG
VOD
SMS
ES
Scheduled Task
Video Processing
Success Stories
Tencent Online Education
Online Video Industry
Tencent Online Education
Best Practice of Tencent IEG Going Global
API Documentation
History
Introduction
API Category
Making API Requests
Other APIs
Namespace APIs
Layer Management APIs
Async Event Management APIs
Trigger APIs
Function APIs
Function and Layer Status Description
Data Types
Error Codes
SDK Documentation
FAQs
General
Web Function
Billing FAQs
Network FAQs
Log FAQs
SCF utility class
Event Handling FAQs
API Gateway Trigger FAQs
Related Agreement
Service Level Agreement
Contact Us
Glossary
ドキュメントServerless Cloud FunctionUse CasesCDNSCF + CDN for Scheduled Prefetch/Purge

SCF + CDN for Scheduled Prefetch/Purge

PDF
フォーカスモード
フォントサイズ
最終更新日: 2024-12-02 17:40:42
Scheduled purge/prefetch tasks can be triggered through SCF. Such tasks are included in the daily purge/prefetch quota and may fail to be executed if the quota is exceeded.

Configurations

Log in to the CDN console, select Plugin Center on the sidebar, click the scheduled purge/prefetch plugin feature block, and enable scheduled purge/prefetch to enter the task configuration page. After this feature is enabled, you can also click Basic Configuration at the bottom of the block to enter the scheduled purge/prefetch task list page for configuration.
On the Create Scheduled Task page, select the desired task type, set the cron scheduling expression (see the example below), enter the corresponding purge/prefetch URLs, and perform SCF authorization. Then, the system can automatically generate the corresponding SCF function and trigger the task as scheduled.
Note:
Do not delete this function in the SCF console.
On the task status page, you can view the last execution of the scheduled task.

Cron Expression

A cron expression contains seven values separated by spaces.
Value
Field
Value Range
Wildcard
1
Second
An integer between 0 and 59
, - * /
2
Minute
An integer between 0 and 59
, - * /
3
Hour
An integer between 0 and 23
, - * /
4
Day
An integer between 1 and 31 (the number of days in the month needs to be considered)
, - * /
5
Month
An integer between 1 and 12 or JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, or DEC
, - * /
6
Day of week
An integer between 0 and 6 or MON, TUE, WED, THU, FRI, SAT, or SUN, where 0 means Monday, 1 means Tuesday, and so on
, - * /
7
Year
An integer between 1970–2099
, - * /

Wildcards have the following meanings:
Wildcard
Description
, (comma)
It represents the union of characters separated by commas; for example, 1, 2, 3 in the "Hour" field means 1:00, 2:00 and 3:00
- (hyphen)
It contains all values in the specified range; for example, in the "Day" field, 1-15 contains the 1st to the 15th day of the specified month
* (asterisk)
It means all values; for example, in the "Hour" field, * means every o'clock
/ (forward slash)
It specifies the increment; for example, in the "Minute" field, you can enter 1/10 to specify repeating every ten minutes from the first minute on (e.g., at the 11th minute, the 21st minute, the 31st minute, and so on)

Note:
When both the "Day" and "Week" fields in a cron expression are specified, they are in an "or" relationship, i.e., the conditions of both are effective separately.

Example

One-Time task
33 22 11 6 7 * 2021 means triggering the task at 11:22:33 on July 6, 2021.
00 00 20 25 10 * 2021 means triggering the task at 20:00:00 on October 25, 2021.
Periodic task
*/5 * * * * * * means triggering the task once every 5 seconds.
0 0 2 1 * * * means triggering the task once at 2 AM on the 1st day of every month.
0 15 10 * * MON-FRI * means triggering the task once every day at 10:15 AM Monday through Friday.
0 0 10,14,16 * * * * means triggering the task once every day at 10 AM, 2 PM, and 4 PM.
0 */30 9-17 * * * * means triggering the task once every half hour from 9 AM to 5 PM every day.
0 0 12 * * WED * means triggering the task once at 12:00 noon every Wednesday.

Billing Description

The scheduled purge/prefetch feature is free of charge. However, it will call SCF to create scheduled tasks, which may incur SCF fees if the free tier of SCF is exceeded. For more information, see Free Tier.

ヘルプとサポート

この記事はお役に立ちましたか?

フィードバック