Tag

Scheduled Task

0 views collected around this technical thread.

Spring Full-Stack Practical Cases
Spring Full-Stack Practical Cases
Oct 10, 2024 · Backend Development

Run a Spring Boot Scheduled Task Only Once – Practical Code Guide

This article explains how to configure a Spring Boot scheduled task to execute just once, covering three approaches—specifying a start time with TaskScheduler, using @Scheduled with an initial delay, and creating a custom PeriodicTrigger—complete with runnable code examples.

Backend DevelopmentCustom TriggerJava
0 likes · 7 min read
Run a Spring Boot Scheduled Task Only Once – Practical Code Guide
Top Architect
Top Architect
Jan 10, 2024 · Backend Development

Implementing Automatic Order Cancellation After 30 Minutes in Spring Boot

This article explains three Spring Boot approaches—using @Scheduled tasks, RabbitMQ delayed queues, and Redis key‑expiration events—to automatically cancel orders that remain unpaid for 30 minutes, complete with code samples and configuration guidance.

BackendOrder CancellationRabbitMQ
0 likes · 8 min read
Implementing Automatic Order Cancellation After 30 Minutes in Spring Boot
FunTester
FunTester
Jun 6, 2023 · Backend Development

Dynamic Adjustment of Java ThreadPoolExecutor Core Pool Size Based on Queue Length

The article explains how to extend Java's ThreadPoolExecutor by dynamically increasing or decreasing corePoolSize according to the task queue length, using setCorePoolSize, a daemon monitoring thread, and scheduled tasks to improve asynchronous processing performance in Spring Boot applications.

ConcurrencyDynamic ScalingJava
0 likes · 7 min read
Dynamic Adjustment of Java ThreadPoolExecutor Core Pool Size Based on Queue Length
Selected Java Interview Questions
Selected Java Interview Questions
Mar 24, 2023 · Backend Development

Isolating Transactions in Spring Scheduled Tasks to Prevent Whole‑Loop Rollback

The article explains how to process a batch of overdue unpaid orders in a Spring scheduled task by wrapping each order's business logic in a separate REQUIRES_NEW transaction, catching exceptions, and manually rolling back only the failing transaction so that other orders remain unaffected.

Backend DevelopmentJavaREQUIRES_NEW
0 likes · 6 min read
Isolating Transactions in Spring Scheduled Tasks to Prevent Whole‑Loop Rollback
Top Architect
Top Architect
Jul 6, 2022 · Backend Development

Implementing Automatic Order Closure in E‑commerce: Scheduled Tasks, RocketMQ Delay Queue, RabbitMQ Dead‑Letter Queue, Time Wheel Algorithm, and Redis Expiration

The article explains how to automatically close unpaid e‑commerce orders by comparing five approaches—simple scheduled tasks, RocketMQ delayed messages, RabbitMQ dead‑letter queues, a time‑wheel algorithm, and Redis key‑expiration listeners—detailing their advantages, drawbacks, and providing Java code examples for each method.

@OrderJavaMessage Queue
0 likes · 16 min read
Implementing Automatic Order Closure in E‑commerce: Scheduled Tasks, RocketMQ Delay Queue, RabbitMQ Dead‑Letter Queue, Time Wheel Algorithm, and Redis Expiration
NetEase Media Technology Team
NetEase Media Technology Team
Aug 2, 2019 · Backend Development

Delayed Message Queue Implementation: Use Cases, Comparison, and NetEase Open Course Practice

The article explains how delayed message queues replace inefficient scheduled‑task scans in distributed systems, outlines common use cases such as order timeouts and retries, compares RabbitMQ, RocketMQ, Kafka, ActiveMQ and Redis implementations, and details NetEase’s ActiveMQ‑based solution with idempotent processing and traceability.

ActiveMQKafkaMessage Queue
0 likes · 13 min read
Delayed Message Queue Implementation: Use Cases, Comparison, and NetEase Open Course Practice
Java Architecture Diary
Java Architecture Diary
Jul 31, 2019 · Backend Development

How to Re‑trigger a Stalled Spring Scheduled Task with Arthas

This article explains how to diagnose and manually re‑execute a Spring @Scheduled task that fails to send notifications by using Arthas to obtain the ApplicationContext, invoke the bean method, and reveals that a missing timeout in Hutool caused the original hang.

ArthasDiagnosticsJava
0 likes · 6 min read
How to Re‑trigger a Stalled Spring Scheduled Task with Arthas