Personalized Execution Time Optimization for the Scheduled Jobs

Yang Liu, Juan Wang, Zhengxing Chen, Ian Fox, Imani Mufti, Jason Sukumaran, Baokun He, Xiling Sun, Feng LiangarXiv 2022 · DOI

Abstract

Meta researchers developed a multi-tenant machine learning framework to optimize execution timestamps for billions of scheduled jobs. Using a learning-to-rank approach and a "best time policy," the system coordinates across product use cases to avoid "clumped" execution times, achieving significant gains in user engagement and infrastructure efficiency. This paper details the architecture, methodology, and production results of this large-scale optimization service.

Introduction

In modern distributed systems, asynchronous job schedulers handle massive volumes of tasks, such as sending notifications or pre-computing content for recommendation engines. A critical challenge is determining the optimal execution time for these tasks. Executing too early results in stale data, while executing too late or during inactive hours leads to low user engagement. Furthermore, "peak time" is a finite resource; if every internal service attempts to run jobs during a user's most active hour, it creates infrastructure spikes and user fatigue.

System Architecture

The framework is designed as a multi-tenant service that integrates with existing schedulers (such as Meta's FOQS). It provides an end-to-end pipeline from data collection to real-time decision-making.

High-level architecture of the multi-tenant execution time optimization framework.

As shown in the architecture diagram, the system consists of a recurring model training pipeline that feeds into inference services. The Execution Time Optimization Service provides the job scheduler with optimized execution times (denoted as $\mathcal{T}_e$) based on user activity signals and product-specific requirements. This modular design allows different product teams to leverage the service as an "off-the-shelf" solution.

Methodology

The authors frame the problem as a Learning-to-Rank (LTR) task. Instead of predicting a simple binary outcome for a specific time, the system ranks all 24 hourly slots in a day for a given user to create a personalized utility map.

Signal Assembly

Since users interact differently across channels (e.g., push notifications vs. email), the system uses an ensemble learner. It combines multiple streams of activity signals using feature-weighted linear stacking to create a unified utility score for each time slot.

Best Time Policy

To prevent "clumping"—where multiple jobs fire simultaneously—the authors implemented an "Avoid $w$-slot nearby" policy. Standard ranking models assume items are independent, but in scheduling, time slots are highly dependent; sending one notification makes a subsequent one less effective.

Illustration of the 'Avoid nearby' policy picking the top 3 execution times while maintaining temporal gaps.

As illustrated above, the algorithm iteratively selects the highest-ranked time slot and then "masks" a window of $w$ hours around it before selecting the next best slot. This heuristic ensures that execution times are sufficiently spread out, managing both server load and user attention.

Tiered Coordination

To prevent cannibalization between different products, use cases are classified into priority tiers. Low-priority jobs are programmatically restricted from picking absolute peak time slots, leaving them open for high-priority tasks.

Experimental Results

The framework was evaluated using Meta’s internal production traffic, sampling 1% of traffic for training and daily-shuffled exploration. Key results include:

  • Execution Efficiency: Significant improvements in the "daily metrics per execution" ratio, with gains of +8.2% and +8.1% for major push notification use cases.
  • Pre-computation: Candidate generation for recommenders saw a +2.2% efficiency boost.
  • Policy Impact: The "avoid 2-hour nearby" policy outperformed a standard "Top-N" approach by +2.2% in efficiency and +0.15% in total product impact.
  • Coordination: The tiered coordination system improved delivery efficiency for both high-priority (+0.13%) and low-priority (+0.7%) groups simultaneously.

Conclusion

This framework demonstrates that personalized execution timing can significantly improve both user experience and infrastructure health at scale. While the current system uses learned static weights, future work will explore Reinforcement Learning to decide not just when to execute a job, but how many times to execute it based on real-time feedback.

Summary updated

BibTeX
@misc{liu2022personalized,
  author = {Yang Liu and Juan Wang and Zhengxing Chen and Ian Fox and Imani Mufti and Jason Sukumaran and Baokun He and Xiling Sun and Feng Liang},
  title = {{Personalized Execution Time Optimization for the Scheduled Jobs}},
  year = {2022},
  eprint = {2203.06158},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2203.06158},
}
Figure