<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Background-Jobs on 每日拍拍</title>
    <link>https://dailypypy.org/tags/background-jobs/</link>
    <description>Recent content in Background-Jobs on 每日拍拍</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>zh-tw</language>
    <copyright>© 2026 每日拍拍</copyright>
    <lastBuildDate>Tue, 12 May 2026 10:33:00 +0800</lastBuildDate><atom:link href="https://dailypypy.org/tags/background-jobs/index.xml" rel="self" type="application/rss+xml" />
    <follow_challenge>
      <feedId>155076163427069952</feedId>
      <userId>154825760438254592</userId>
    </follow_challenge>
    
    
    <item>
      <title>Python APScheduler 實戰：讓程式定時執行背景工作</title>
      <link>https://dailypypy.org/learn/python-apscheduler/</link>
      <pubDate>Tue, 12 May 2026 10:33:00 +0800</pubDate>
      
      <guid>https://dailypypy.org/learn/python-apscheduler/</guid>
      <description>&lt;!---
1440x768
prompt: masterpiece, best quality, highres, clean anime illustration, japanese anime style, soft shading, flat color design, 1girl, black hair, green eyes, white off-shoulder shirt, black short skirt, from below low angle, holding a small alarm clock with both hands, cheerful determined smile, looking at viewer, pastel apricot background, subtle clock icon shapes, neat composition, detailed eyes, cute and smart vibe, minimal background, polished illustration, no text
negative prompt: worst quality, bad eye, bad hand, extra limbs, manga, multiple views, monochrome, text, signature
preflight: distinct from python-watchdog/event-driven file monitoring, python-tenacity/retry-backoff, and python-asyncio/concurrency basics; this post focuses on time-based scheduling with date/interval/cron triggers and deployment gotchas.
---&gt;

&lt;h2 class=&#34;relative group&#34;&gt;一. 前言：有些程式不是現在跑，是「等一下」跑 
    &lt;div id=&#34;一-前言有些程式不是現在跑是等一下跑&#34; class=&#34;anchor&#34;&gt;&lt;/div&gt;
    
    &lt;span
        class=&#34;absolute top-0 w-6 transition-opacity opacity-0 ltr:-left-6 rtl:-right-6 not-prose group-hover:opacity-100&#34;&gt;
        &lt;a class=&#34;group-hover:text-primary-300 dark:group-hover:text-neutral-700&#34;
            style=&#34;text-decoration-line: none !important;&#34; href=&#34;#%e4%b8%80-%e5%89%8d%e8%a8%80%e6%9c%89%e4%ba%9b%e7%a8%8b%e5%bc%8f%e4%b8%8d%e6%98%af%e7%8f%be%e5%9c%a8%e8%b7%91%e6%98%af%e7%ad%89%e4%b8%80%e4%b8%8b%e8%b7%91&#34; aria-label=&#34;定位點&#34;&gt;#&lt;/a&gt;
    &lt;/span&gt;        
    
&lt;/h2&gt;
&lt;p&gt;你一定遇過這種需求：每天早上九點寄報表、每五分鐘同步資料、使用者按下按鈕後三十分鐘再提醒、半夜自動清暫存檔。
這些事情看起來都可以用 &lt;code&gt;while True&lt;/code&gt; 加 &lt;code&gt;time.sleep()&lt;/code&gt; 解決。&lt;/p&gt;</description>
      <media:content xmlns:media="http://search.yahoo.com/mrss/" url="https://dailypypy.org/learn/python-apscheduler/featured.png" />
    </item>
    
  </channel>
</rss>
