In my ongoing Job Application Tracker project, I faced a challenge:

๐Ÿ‘‰ I needed to send ๐—ฟ๐—ฒ๐—บ๐—ถ๐—ป๐—ฑ๐—ฒ๐—ฟ ๐—ฒ๐—บ๐—ฎ๐—ถ๐—น๐˜€ ๐˜๐—ผ ๐—ฐ๐—ผ๐—บ๐—ฝ๐—ฎ๐—ป๐—ถ๐—ฒ๐˜€ based on a ๐˜‚๐˜€๐—ฒ๐—ฟ-๐—ฑ๐—ฒ๐—ณ๐—ถ๐—ป๐—ฒ๐—ฑ ๐—ฟ๐—ฒ๐—บ๐—ถ๐—ป๐—ฑ๐—ฒ๐—ฟ ๐—ฑ๐—ฎ๐˜๐—ฒ while creating or updating a job application.

Hereโ€™s how I handled it:

๐Ÿ’ก I used ๐—›๐—ฎ๐—ป๐—ด๐—ณ๐—ถ๐—ฟ๐—ฒ, a background job library in .NET, to schedule emails to be sent on the exact reminder date.

๐Ÿ” ๐—œ๐—ณ ๐˜๐—ต๐—ฒ ๐—ฎ๐—ฝ๐—ฝ ๐—ฎ๐—ป๐—ฑ ๐—›๐—ฎ๐—ป๐—ด๐—ณ๐—ถ๐—ฟ๐—ฒ ๐—ฎ๐—ฟ๐—ฒ ๐—ฟ๐˜‚๐—ป๐—ป๐—ถ๐—ป๐—ด, the email is sent exactly at the scheduled time.

โธ๏ธ ๐—œ๐—ณ ๐˜๐—ต๐—ฒ ๐—ฎ๐—ฝ๐—ฝ ๐—ผ๐—ฟ ๐—›๐—ฎ๐—ป๐—ด๐—ณ๐—ถ๐—ฟ๐—ฒ ๐—ถ๐˜€ ๐—ฑ๐—ผ๐˜„๐—ป, the job stays in a pending state โ€” and ๐—ฒ๐˜…๐—ฒ๐—ฐ๐˜‚๐˜๐—ฒ๐˜€ ๐—ฎ๐˜‚๐˜๐—ผ๐—บ๐—ฎ๐˜๐—ถ๐—ฐ๐—ฎ๐—น๐—น๐˜† once both are back up. No jobs are lost. ๐Ÿ’ช

This helped me:
โœ” Keep the app lightweight

โœ” Avoid constant polling or manual checks

โœ” Learn how Hangfire persists and recovers jobs via database

โ“๐——๐—ฒ๐˜ƒ๐—ฒ๐—น๐—ผ๐—ฝ๐—ฒ๐—ฟ๐˜€ โ€” ๐—ต๐—ผ๐˜„ ๐—ฎ๐—ฟ๐—ฒ ๐˜†๐—ผ๐˜‚ ๐—ต๐—ฎ๐—ป๐—ฑ๐—น๐—ถ๐—ป๐—ด ๐˜€๐—ฐ๐—ต๐—ฒ๐—ฑ๐˜‚๐—น๐—ฒ๐—ฑ ๐—ผ๐—ฟ ๐—ฑ๐—ฒ๐—น๐—ฎ๐˜†๐—ฒ๐—ฑ ๐˜๐—ฎ๐˜€๐—ธ๐˜€ ๐—ถ๐—ป ๐˜†๐—ผ๐˜‚๐—ฟ ๐—ฎ๐—ฝ๐—ฝ๐—น๐—ถ๐—ฐ๐—ฎ๐˜๐—ถ๐—ผ๐—ป๐˜€? ๐—”๐—ฟ๐—ฒ ๐˜†๐—ผ๐˜‚ ๐˜‚๐˜€๐—ถ๐—ป๐—ด ๐—›๐—ฎ๐—ป๐—ด๐—ณ๐—ถ๐—ฟ๐—ฒ, ๐—ค๐˜‚๐—ฎ๐—ฟ๐˜๐˜‡.๐—ก๐—˜๐—ง, ๐—”๐˜‡๐˜‚๐—ฟ๐—ฒ ๐—™๐˜‚๐—ป๐—ฐ๐˜๐—ถ๐—ผ๐—ป๐˜€, ๐—ผ๐—ฟ ๐˜€๐—ผ๐—บ๐—ฒ๐˜๐—ต๐—ถ๐—ป๐—ด ๐—ฒ๐—น๐˜€๐—ฒ? ๐—œโ€™๐—ฑ ๐—น๐—ผ๐˜ƒ๐—ฒ ๐˜๐—ผ ๐—ต๐—ฒ๐—ฎ๐—ฟ ๐˜†๐—ผ๐˜‚๐—ฟ ๐—ฎ๐—ฝ๐—ฝ๐—ฟ๐—ผ๐—ฎ๐—ฐ๐—ต ๐—ฎ๐—ป๐—ฑ ๐˜๐—ต๐—ผ๐˜‚๐—ด๐—ต๐˜๐˜€! ๐Ÿ’ฌ๐Ÿ‘‡