
Shabbat Aware Scheduler
- 62 installs
- 21 repo stars
- Updated August 3, 2026
- skills-il/localization
Shabbat-aware Scheduler is an agent skill that integrates Hebcal Shabbat and holiday windows so automations pause and resume at correct candle lighting and Havdalah times.
About
Shabbat-aware Scheduler is a localization skill for solo builders shipping software to Israeli users who must not fire cron jobs, marketing pushes, or support bots during Shabbat and linked holidays. It packages verified Hebcal claims—candle-lighting offsets that vary by city, Havdalah tied to star visibility or fixed-minute customs, and API parameters builders often get wrong—so agents implement schedulers against primary sources instead of hard-coded Friday guesses. Use it when wiring notification windows, SLA timers, or agent reminders that respect religious observance. The skill ties documentation across SKILL.md, Hebrew variants, reference calendars, and a Python checker script, making it a multi-phase companion: integrate during Build, validate timing in Ship testing, and tune live jobs in Operate. It does not replace legal compliance review for every jurisdiction, but it sharply reduces embarrassing Saturday deploys or autoresponders for indie SaaS and internal tools.
- Documents Hebcal Shabbat times REST behavior with sourced claim IDs in SKILL metadata
- Default candle lighting 18 minutes before sunset; Jerusalem 40 minutes; Haifa and Zikhron Ya'akov 30 minutes
- Havdalah defaults to Tzeit HaKochavim (sun 8.5° below horizon) with m=42, m=50, m=72 minute alternatives
- References Israeli holiday calendar docs and scripts/check_shabbat.py for enforcement
- Localization-focused skill from skills-il for builders serving Israeli users
Shabbat Aware Scheduler by the numbers
- 62 all-time installs (skills.sh)
- Ranked #984 of 2,715 Automation & Workflows skills by installs in the Skillselion catalog
- Security screen: MEDIUM risk (skills.sh audit)
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/skills-il/localization --skill shabbat-aware-schedulerAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 62 |
|---|---|
| repo stars | ★ 21 |
| Security audit | 2 / 3 scanners passed |
| Last updated | August 3, 2026 |
| Repository | skills-il/localization ↗ |
What it does
Schedule jobs, notifications, and automations around Israeli Shabbat and holidays using Hebcal-accurate candle lighting and Havdalah times.
Who is it for?
SaaS, community apps, and agent automations targeting Israel with real cron, email, or push schedules tied to the Jewish calendar.
Skip if: Products with no Israeli audience, teams unwilling to maintain Hebcal API dependencies, or flows that need rabbinic authority beyond documented API parameters without local review.
When should I use this skill?
User builds or fixes schedulers, crons, or agents that must respect Israeli Shabbat, candle lighting, Havdalah, or holiday blackout windows.
What you get
Your scheduler and agent workflows use documented Hebcal defaults and city offsets, with a check script path to validate windows before production traffic hits forbidden hours.
- Hebcal-backed Shabbat and holiday window logic in app or agent workflows
- Validated blackout checks via documented script and reference calendar notes
By the numbers
- Default candle lighting is 18 minutes before sunset; Jerusalem uses 40 minutes; Haifa and Zikhron Ya'akov use 30 minutes
- Havdalah minute alternatives documented: m=42, m=50, m=72 (Rabbeinu Tam)
Files
Shabbat-Aware Scheduler
Instructions
Step 1: Determine Scheduling Context
| Context | Key Constraints | Examples |
|---|---|---|
| Meeting scheduling | Israeli business hours (Sun-Thu), Shabbat, chagim | "Schedule a team meeting next week" |
| Deployment planning | No deploys during Shabbat, chagim, or Erev Chag | "When can we deploy this release?" |
| Event planning | Hebrew calendar restrictions, venue availability | "Plan a product launch event" |
| Cron/automation | Skip Shabbat and holidays for recurring tasks | "Run this job daily except Shabbat" |
| Notification timing | Don't send during Shabbat or late hours | "Schedule push notification campaign" |
Step 2: Get Zmanim and Holiday Data
Use the HebCal API to retrieve Shabbat times and holiday data. See scripts/check_shabbat.py for a ready-to-use utility.
Query HebCal API for Shabbat times:
import requests
from datetime import datetime, timedelta
# Candle-lighting minutes before sunset by city minhag.
# Jerusalem uses 40 min, Haifa and Zikhron Ya'akov use 30 min, elsewhere 18 min.
CANDLE_LIGHTING_MIN = {
"jerusalem": 40,
"haifa": 30,
"zikhron_yaakov": 30,
"default": 18,
}
def get_shabbat_times(date=None, latitude=31.7683, longitude=35.2137,
tzid="Asia/Jerusalem", city="jerusalem"):
"""Get Shabbat candle lighting and havdalah times.
Default location: Jerusalem (40 min candle-lighting custom).
"""
if date is None:
date = datetime.now()
# Find next Friday
days_until_friday = (4 - date.weekday()) % 7
friday = date + timedelta(days=days_until_friday)
b = CANDLE_LIGHTING_MIN.get(city, CANDLE_LIGHTING_MIN["default"])
response = requests.get("https://www.hebcal.com/shabbat", params={
"cfg": "json",
"gy": friday.year,
"gm": friday.month,
"gd": friday.day,
"latitude": latitude,
"longitude": longitude,
"tzid": tzid,
"b": b, # Candle lighting min before sunset (city-aware)
"M": "on", # Havdalah at Tzeit HaKochavim (sun 8.5 deg below horizon)
# Alternative: use m=42 / m=50 / m=72 for fixed minutes after sunset
})
data = response.json()
times = {}
for item in data.get("items", []):
if item["category"] == "candles":
times["candle_lighting"] = item["date"]
elif item["category"] == "havdalah":
times["havdalah"] = item["date"]
return timesGet all Israeli holidays for a year:
def get_holidays(year):
"""Get all Israeli holidays for a given year."""
response = requests.get("https://www.hebcal.com/hebcal", params={
"v": 1,
"cfg": "json",
"year": year,
"month": "x", # All months
"maj": "on", # Major holidays
"min": "on", # Minor holidays
"mod": "on", # Modern holidays
"i": "on", # Israeli holidays (1-day yom tov)
"nx": "off",
"ss": "off"
})
data = response.json()
holidays = []
for item in data.get("items", []):
if item["category"] in ["holiday", "roshchodesh"]:
holidays.append({
"title": item["title"],
"date": item["date"],
"category": item.get("subcat", item["category"]),
"yomtov": item.get("yomtov", False),
"memo": item.get("memo", "")
})
return holidaysStep 3: Implement Scheduling Logic
Israeli business hours:
| Day | Hours | Notes |
|---|---|---|
| Sunday | 08:00-18:00 | First day of Israeli workweek |
| Monday | 08:00-18:00 | Regular business day |
| Tuesday | 08:00-18:00 | Regular business day |
| Wednesday | 08:00-18:00 | Regular business day |
| Thursday | 08:00-18:00 | Regular business day |
| Friday | 08:00-13:00 | Half day (closes before Shabbat) |
| Saturday | Closed | Shabbat (no business) |
Core scheduling function:
from datetime import datetime, timedelta, time
import pytz
IL_TZ = pytz.timezone("Asia/Jerusalem")
BUSINESS_HOURS = {
6: (time(8, 0), time(18, 0)), # Sunday
0: (time(8, 0), time(18, 0)), # Monday
1: (time(8, 0), time(18, 0)), # Tuesday
2: (time(8, 0), time(18, 0)), # Wednesday
3: (time(8, 0), time(18, 0)), # Thursday
4: (time(8, 0), time(13, 0)), # Friday (half day)
5: None, # Saturday (Shabbat)
}
def is_business_day(date, holidays_cache=None):
"""Check if a date is a valid Israeli business day."""
if date.weekday() == 5: # Saturday
return False
if holidays_cache:
date_str = date.strftime("%Y-%m-%d")
for h in holidays_cache:
if h["date"].startswith(date_str) and h["yomtov"]:
return False
return TrueStep 4: Holiday-Aware Cron Jobs
def should_run_today(holidays_cache=None, skip_friday=False, skip_erev_chag=False):
"""Determine if a scheduled job should run today."""
today = datetime.now(IL_TZ).date()
# Never run on Shabbat
if today.weekday() == 5:
return False, "Shabbat"
# Check holidays
if holidays_cache:
date_str = today.strftime("%Y-%m-%d")
for h in holidays_cache:
if h["date"].startswith(date_str):
if h["yomtov"]:
return False, f"Yom Tov: {h['title']}"
# Check if tomorrow is Yom Tov (today is Erev Chag)
if skip_erev_chag:
tomorrow = today + timedelta(days=1)
tomorrow_str = tomorrow.strftime("%Y-%m-%d")
for h in holidays_cache:
if h["date"].startswith(tomorrow_str) and h["yomtov"]:
return False, f"Erev Chag: {h['title']} tomorrow"
if skip_friday and today.weekday() == 4:
return False, "Friday (half day)"
return True, "Business day"Step 5: Pre-Holiday and Seasonal Awareness
| Period | Dates (approx.) | Impact on Scheduling |
|---|---|---|
| Erev Shabbat (Friday) | Every week | Close by 13:00-15:00 depending on season |
| Erev Rosh Hashanah | ~Sep | Businesses close by noon |
| Rosh Hashanah + Yom Kippur season | Tishrei 1-10 | 10 days of reduced availability |
| Sukkot week | Tishrei 15-22 | Many on vacation, chol ha-moed |
| Pre-Pesach week | Before Nisan 15 | Extremely busy, cleaning/shopping |
| Pesach week | Nisan 15-22 | Many on vacation, chol ha-moed |
| Three Weeks (Bein HaMetzarim) | 17 Tammuz to 9 Av (around Jul-early Aug) | No weddings or celebratory events; corporate parties typically deferred |
| Tisha B'Av | 9 Av (around late Jul / early Aug) | Fast day; many treat as half-day or off |
| Summer (Jul-Aug) | July-August | School vacation, reduced business |
| Winter Shabbat | Nov-Feb | Early Shabbat (Friday closes earlier) |
| Summer Shabbat | May-Aug | Late Shabbat (more Friday availability) |
Key 2026 holiday dates to plan around (Israel observance):
| Holiday | Gregorian (around) | Workdays lost |
|---|---|---|
| Pesach | April 1 to April 8, 2026 | First and seventh days are Yom Tov; middle is chol ha-moed |
| Yom HaShoah | April 13 to April 14, 2026 (evening to evening) | Memorial; entertainment closed |
| Yom HaZikaron | April 20 to April 21, 2026 | Memorial; restricted commerce |
| Yom HaAtzmaut | April 21 to April 22, 2026 | Independence Day; most businesses closed |
| Shavuot | May 21 to May 22, 2026 (evening to evening) | One day Yom Tov in Israel |
| Tisha B'Av | July 22 to July 23, 2026 (evening to evening) | Fast day |
| Rosh Hashana | September 11 to September 13, 2026 | Two-day Yom Tov + Shabbat = three-day no-work span |
| Yom Kippur | September 20 to September 21, 2026 (evening to evening) | Country shuts down |
| Sukkot | September 25 to October 2, 2026 | First and last days Yom Tov; middle is chol ha-moed |
| Shemini Atzeret / Simchat Torah | October 2 to October 3, 2026 | One day in Israel, falls on Friday-Shabbat |
Dates verified against Hebcal 2026 (Israeli observance). Always re-check the calendar each year; the Hebrew calendar slides against the Gregorian by 11 to 19 days. In 2026, Yom HaAtzmaut is postponed by one day (nidcheh) because the natural date would have triggered Yom HaZikaron on a problematic day.
Examples
Example 1: Schedule a Meeting
User says: "Schedule a team meeting for next week" Result: Check Israeli business hours (Sun-Thu), verify no chagim, suggest available slots. Avoid Friday unless morning and confirm it is not Erev Chag.
Example 2: Deployment Window
User says: "When is the safest time to deploy this week?" Result: Find a Tuesday or Wednesday slot (mid-week, maximum buffer from Shabbat), during business hours, not before a holiday. Recommend morning deployment for maximum rollback time before Shabbat.
Example 3: Holiday-Aware Cron
User says: "Set up a daily report that skips Shabbat and holidays" Result: Provide cron configuration with should_run_today() check, pre-loaded holiday cache for the year, with logging for skipped days.
Bundled Resources
Scripts
scripts/check_shabbat.py: standalone utility to query Shabbat times, Israeli holidays, and business-day status via the HebCal API. Supports checking whether a date is Shabbat/Yom Tov, listing all holidays for a year, and finding the next available Israeli business slot with configurable duration, location, and city minhag. Run:python scripts/check_shabbat.py --help
References
references/israeli-holiday-calendar.md: complete Israeli holiday calendar with Hebrew dates, Gregorian approximations, scheduling impact levels (high/medium/low), mourning period restrictions, seasonal Shabbat candle-lighting times by month for Jerusalem, 2026 key dates, and HebCal API endpoint reference. Consult when planning around chagim, determining seasonal Friday closing times, or checking if an event conflicts with a mourning period.
Recommended MCP Servers
For live Hebrew calendar data, pair this skill with:
| MCP Server | What it provides | Install |
|---|---|---|
| hebcal | Jewish holidays, Shabbat candle lighting times, Havdalah times, Torah readings, and Hebrew-Gregorian date conversion via the official Hebcal API | Install hebcal |
When the hebcal MCP is available, use its tools for accurate Shabbat times and holiday dates instead of hardcoded values. The MCP provides location-aware candle lighting times for any Israeli city.
Offline Libraries
If you cannot reach the Hebcal API at runtime (CI, airgapped, rate-limited at 90 req/10s), use a local library and skip the HTTP call:
| Library | Language | Notes |
|---|---|---|
@hebcal/core | JavaScript / TypeScript | Actively maintained (v6.x as of May 2026). Pure JS, no network. Install: npm i @hebcal/core |
pyluach | Python | Hebrew calendar arithmetic and Hebrew/Gregorian conversion. Stable but low-activity (v2.3.0); fine for date conversion but no built-in candle-lighting times. Pair with a sunset/zmanim library or cache pre-computed times |
hebcal-go | Go | Maintained by the Hebcal team |
The deprecated hebcal-js package (NPM hebcal) is the predecessor of @hebcal/core; do not start new work on it.
Gotchas
- Shabbat candle-lighting differs by city in Israel. Jerusalem uses 40 minutes before sunset, Haifa and Zikhron Ya'akov use 30 minutes, and most other cities use 18 minutes. Using one
b=value for all of Israel will under- or over-shoot Friday cutoffs by 10 to 22 minutes. Pass the city-specific offset to the Hebcal API. - Israeli holidays (chagim) have different work restrictions than Shabbat. Most holidays are one day in Israel but two days in the diaspora (Rosh Hashana is two days in both). Using a diaspora holiday calendar for Israeli scheduling will block extra workdays that are actually chol ha-moed in Israel.
- The Hebrew calendar has leap years with an extra month (Adar II), occurring 7 times in a 19-year cycle. Agents may calculate dates using the Gregorian calendar and miss this month entirely.
- Business hours in Israel run Sunday to Thursday, with Friday a half-day (until early afternoon). Saturday is the weekly rest day, not Sunday. Agents may schedule Friday afternoon meetings or Monday-morning deadlines.
- Yom HaAtzmaut and Yom HaZikaron can be postponed (nidcheh) when their natural date would conflict with Shabbat. In 2026 the dates shift accordingly. Always trust the Hebcal
i=onflag rather than computing Iyar 5 directly. - Havdalah default in Hebcal is now Tzeit HaKochavim (sun 8.5 degrees below the horizon, around 40 to 50 minutes after sunset in Israel). Stricter Rabbeinu Tam observers use 72 minutes. Pick the right
m=value if your audience is not the default. - Yom Kippur is treated as Shabbat for scheduling purposes (full shutdown, including secular businesses, transit, and broadcast media in Israel). Do not deploy or schedule anything inside the 25-hour window.
- The Three Weeks (17 Tammuz to 9 Av) is a mourning period; weddings, concerts, and corporate celebration events are typically deferred. The Nine Days (1 to 9 Av) is stricter. Treat as a "no launch parties" window even though it is not a Yom Tov.
Troubleshooting
Error: "Meeting scheduled during Shabbat"
Cause: Timezone mismatch, server in UTC, Shabbat times in local Solution: Always convert to Asia/Jerusalem timezone before checking. Shabbat times vary by season and location.
Error: "Holiday not detected"
Cause: Using Gregorian-only calendar without Hebrew date mapping Solution: Use HebCal API which handles Hebrew-Gregorian conversion. Cache holiday data annually and refresh at Rosh Hashanah.
Error: "Friday meeting too late"
Cause: Fixed 17:00 Friday cutoff regardless of season Solution: In winter, Shabbat can start as early as 16:00. Always check actual candle lighting time for the specific Friday.
Error: "Wrong candle-lighting time for Jerusalem"
Cause: Passing b=18 (the Hebcal default) with Jerusalem coordinates instead of the Jerusalem custom of 40 minutes. Solution: Always pass b=40 when the user is in Jerusalem, b=30 for Haifa and Zikhron Ya'akov, b=18 everywhere else. Hebcal exposes the same convention.
Error: "Havdalah time looks off by 8-30 minutes"
Cause: Mixing M=on (Tzeit HaKochavim, sun 8.5 degrees below horizon, around 42 to 50 min after sunset) with a hardcoded "42 minutes" or "72 minutes" assumption. Solution: Pick one method explicitly. Use M=on for the Hebcal default, m=42 for medium stars, m=50 for small stars, or m=72 for the stricter Rabbeinu Tam custom. Document which one your scheduler uses so downstream agents do not double-shift.
{
"schemaVersion": "1.0",
"skill": "shabbat-aware-scheduler",
"generated_at": "2026-05-20",
"claims": [
{
"claim_id": "candle-lighting-minutes",
"claim": "Hebcal default candle lighting is 18 minutes before sunset; Jerusalem uses 40 minutes, Haifa and Zikhron Ya'akov use 30 minutes.",
"source_url": "https://www.hebcal.com/home/197/shabbat-times-rest-api",
"raw_snippet": "b=18 - Candle-lighting time minutes before sunset. By default, candle lighting time is 18 minutes before sundown ... variations for specific locations like Jerusalem (40 min) and Haifa (30 min).",
"fetched_at": "2026-05-20",
"appears_in": ["SKILL.md", "SKILL_HE.md", "references/israeli-holiday-calendar.md", "scripts/check_shabbat.py"]
},
{
"claim_id": "havdalah-default-tzeit-hakochavim",
"claim": "Hebcal default Havdalah with M=on is Tzeit HaKochavim, sun 8.5 degrees below horizon. Fixed-minute alternatives: m=42 medium stars, m=50 small stars, m=72 Rabbeinu Tam.",
"source_url": "https://www.hebcal.com/home/4463/candle-lighting-havdalah-fast-times",
"raw_snippet": "tzeit hakochavim (when 3 small stars are visible, sun 8.5 below horizon) ... 42 minutes for three medium-sized stars, 50 minutes for three small stars, 72 minutes for Rabbeinu Tam, 0 to suppress.",
"fetched_at": "2026-05-20",
"appears_in": ["SKILL.md", "SKILL_HE.md", "references/israeli-holiday-calendar.md"]
},
{
"claim_id": "hebcal-api-rate-limit",
"claim": "Hebcal API rate-limits at 90 requests per 10-second window, returning HTTP 429.",
"source_url": "https://www.hebcal.com/home/developer-apis",
"raw_snippet": "Rate-limiting is used to throttle clients ... You may receive a 429 'Too Many Requests' error if your client makes more than 90 requests in a 10-second window.",
"fetched_at": "2026-05-20",
"appears_in": ["references/israeli-holiday-calendar.md"]
},
{
"claim_id": "pesach-2026",
"claim": "Pesach 2026 runs April 1 to April 8 (first day April 2, last day April 8) in Israeli observance.",
"source_url": "https://www.hebcal.com/holidays/2026?i=on",
"raw_snippet": "Pesach - Wed, Apr 1 - Wed, Apr 8",
"fetched_at": "2026-05-20",
"appears_in": ["SKILL.md", "SKILL_HE.md", "references/israeli-holiday-calendar.md"]
},
{
"claim_id": "shavuot-2026",
"claim": "Shavuot 2026 begins evening Thursday May 21 and ends evening Friday May 22, one-day Yom Tov in Israel.",
"source_url": "https://www.hebcal.com/holidays/2026?i=on",
"raw_snippet": "Shavuot - Thu, May 21 - Fri, May 22",
"fetched_at": "2026-05-20",
"appears_in": ["SKILL.md", "SKILL_HE.md", "references/israeli-holiday-calendar.md"]
},
{
"claim_id": "rosh-hashana-2026",
"claim": "Rosh Hashana 2026: Friday September 11 (eve) through Sunday September 13. Combined with adjacent Shabbat this creates a three-day no-work span.",
"source_url": "https://www.hebcal.com/holidays/2026?i=on",
"raw_snippet": "Rosh Hashana - Fri, Sept 11 - Sun, Sept 13 (multi-day span)",
"fetched_at": "2026-05-20",
"appears_in": ["SKILL.md", "SKILL_HE.md", "references/israeli-holiday-calendar.md"]
},
{
"claim_id": "yom-kippur-2026",
"claim": "Yom Kippur 2026: evening Sunday September 20 through evening Monday September 21.",
"source_url": "https://www.hebcal.com/holidays/2026?i=on",
"raw_snippet": "Yom Kippur - Sun, Sept 20 - Mon, Sept 21",
"fetched_at": "2026-05-20",
"appears_in": ["SKILL.md", "SKILL_HE.md", "references/israeli-holiday-calendar.md"]
},
{
"claim_id": "sukkot-2026",
"claim": "Sukkot 2026 in Israel: Friday September 25 (eve) through Friday October 2. Shemini Atzeret/Simchat Torah on October 2-3 (combined in Israel).",
"source_url": "https://www.hebcal.com/holidays/2026?i=on",
"raw_snippet": "Sukkot - Fri, Sept 25 - Fri, Oct 2 ... Shemini Atzeret & Simchat Torah - Fri, Oct 2 - Sat, Oct 3",
"fetched_at": "2026-05-20",
"appears_in": ["SKILL.md", "SKILL_HE.md", "references/israeli-holiday-calendar.md"]
},
{
"claim_id": "tisha-bav-2026",
"claim": "Tisha B'Av 2026: eve Wednesday July 22 through Thursday July 23. Three Weeks period (17 Tammuz to 9 Av) runs early July to late July 2026.",
"source_url": "https://www.hebcal.com/holidays/2026?i=on",
"raw_snippet": "Tisha B'Av - Wed, July 22 - Thu, July 23",
"fetched_at": "2026-05-20",
"appears_in": ["SKILL.md", "SKILL_HE.md", "references/israeli-holiday-calendar.md"]
},
{
"claim_id": "yom-haatzmaut-2026-nidcheh",
"claim": "Yom HaAtzmaut 2026 falls April 21-22 (postponed/nidcheh from the natural 5 Iyar to avoid Shabbat conflict).",
"source_url": "https://www.hebcal.com/holidays/yom-haatzmaut-2026",
"raw_snippet": "Yom HaAtzma'ut for Hebrew Year 5786 began on Tuesday, 21 April 2026 and ended on Wednesday, 22 April 2026. ... if the 5th of Iyar is on a Monday, the festival is postponed.",
"fetched_at": "2026-05-20",
"appears_in": ["SKILL.md", "SKILL_HE.md", "references/israeli-holiday-calendar.md"]
},
{
"claim_id": "yom-hashoah-2026",
"claim": "Yom HaShoah 2026: April 13-14.",
"source_url": "https://www.hebcal.com/holidays/2026?i=on",
"raw_snippet": "Yom HaShoah - Mon, Apr 13 - Tue, Apr 14",
"fetched_at": "2026-05-20",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "yom-hazikaron-2026",
"claim": "Yom HaZikaron 2026: April 20-21.",
"source_url": "https://www.hebcal.com/holidays/2026?i=on",
"raw_snippet": "Yom HaZikaron - Mon, Apr 20 - Tue, Apr 21",
"fetched_at": "2026-05-20",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "hebcal-core-npm-version",
"claim": "@hebcal/core JavaScript library is actively maintained, latest version 6.5.1 as of May 2026.",
"source_url": "https://www.npmjs.com/package/@hebcal/core",
"raw_snippet": "The latest version of @hebcal/core is 6.5.1, last published 2 days ago. ... perpetual Jewish Calendar API.",
"fetched_at": "2026-05-20",
"appears_in": ["SKILL.md"]
},
{
"claim_id": "pyluach-version",
"claim": "pyluach Python library is at version 2.3.0, low maintenance activity, but stable for Hebrew/Gregorian conversion.",
"source_url": "https://pypi.org/project/pyluach/",
"raw_snippet": "The current version available on PyPI is 2.3.0 ... pyluach hasn't seen any new versions released to PyPI in the past 12 months, and could be considered as a discontinued project or one that receives low attention from its maintainers. However, the package receives a total of 306,840 weekly downloads and is classified as popular.",
"fetched_at": "2026-05-20",
"appears_in": ["SKILL.md"]
},
{
"claim_id": "hebcal-js-deprecated",
"claim": "Legacy 'hebcal' npm package (hebcal-js) is deprecated, succeeded by @hebcal/core.",
"source_url": "https://github.com/hebcal/hebcal-js",
"raw_snippet": "hebcal-js: DEPRECATED - a perpetual Jewish Calendar (JavaScript)",
"fetched_at": "2026-05-20",
"appears_in": ["SKILL.md"]
},
{
"claim_id": "hebcal-shabbat-endpoint",
"claim": "HebCal Shabbat times REST endpoint: https://www.hebcal.com/shabbat with b= (candle-lighting minutes) and M=on or m=N (havdalah) parameters.",
"source_url": "https://www.hebcal.com/home/197/shabbat-times-rest-api",
"raw_snippet": "Endpoint URL: https://www.hebcal.com/shabbat ... b=18 candle-lighting minutes ... M=on for Tzeit HaKochavim ... m=N for fixed minutes.",
"fetched_at": "2026-05-20",
"appears_in": ["SKILL.md", "SKILL_HE.md", "references/israeli-holiday-calendar.md", "scripts/check_shabbat.py"]
},
{
"claim_id": "hebcal-holidays-i-flag",
"claim": "HebCal holiday list endpoint uses i=on flag to return Israeli (one-day Yom Tov) observance instead of diaspora two-day.",
"source_url": "https://www.hebcal.com/home/195/jewish-calendar-rest-api",
"raw_snippet": "i=on - Israeli holiday schedule (1-day Yom Tov instead of diaspora 2-day).",
"fetched_at": "2026-05-20",
"appears_in": ["SKILL.md", "references/israeli-holiday-calendar.md", "scripts/check_shabbat.py"]
}
]
}
{
"author": "skills-il",
"version": "1.3.0",
"category": "localization",
"tags": {
"he": [
"שבת",
"תזמון",
"לוח-עברי",
"זמנים",
"חגים",
"ישראל"
],
"en": [
"shabbat",
"scheduling",
"hebrew-calendar",
"zmanim",
"holidays",
"israel"
]
},
"display_name": {
"he": "מתזמן מודע שבת",
"en": "Shabbat Aware Scheduler"
},
"display_description": {
"he": "מתזמנים משימות עם התחשבות בשבתות, בחגים ובלוח השנה העברי",
"en": "Schedule meetings, deployments, and events respecting Shabbat, Israeli holidays (chagim), and Hebrew calendar constraints. Use when user asks to schedule around Shabbat, \"zmanim\", check Israeli holidays, plan around chagim, set Israeli business hours, or needs Hebrew calendar-aware scheduling logic. Includes halachic times (zmanim) via HebCal API, full Israeli holiday calendar, and Israeli business hour conventions. Do NOT use for religious halachic rulings (consult a rabbi) or diaspora 2-day holiday scheduling."
},
"supported_agents": [
"claude-code",
"cursor",
"github-copilot",
"windsurf",
"opencode",
"codex",
"antigravity",
"gemini-cli"
]
}
Israeli Holiday Calendar Reference
Major Holidays (Yom Tov -- no work)
| Holiday | Hebrew Name | Hebrew Calendar | Approx. Gregorian | Duration |
|---|---|---|---|---|
| Rosh Hashanah | ראש השנה | Tishrei 1-2 | Sep/Oct | 2 days |
| Yom Kippur | יום כיפור | Tishrei 10 | Sep/Oct | 1 day |
| Sukkot | סוכות | Tishrei 15 | Sep/Oct | 1 day (+ chol ha-moed) |
| Shemini Atzeret / Simchat Torah | שמיני עצרת / שמחת תורה | Tishrei 22 | Oct | 1 day (combined in Israel) |
| Pesach (first day) | פסח | Nisan 15 | Mar/Apr | 1 day (+ chol ha-moed) |
| Pesach (last day) | פסח | Nisan 21 | Mar/Apr | 1 day |
| Shavuot | שבועות | Sivan 6 | May/Jun | 1 day |
Note: Israel observes 1-day Yom Tov (not 2 like diaspora) for all holidays except Rosh Hashanah.
National Holidays
| Holiday | Hebrew Name | Hebrew Calendar | Type |
|---|---|---|---|
| Yom Ha-Shoah | יום השואה | Nisan 27 | Memorial -- entertainment closed |
| Yom Ha-Zikaron | יום הזיכרון | Iyar 4 | Memorial -- restricted commerce |
| Yom Ha-Atzmaut | יום העצמאות | Iyar 5 | Independence Day -- most businesses closed |
Scheduling Impact by Period
High Impact (avoid scheduling)
- Rosh Hashanah through Yom Kippur (Tishrei 1-10): "Days of Awe" -- many take extended time off
- Sukkot week (Tishrei 15-22): Chol ha-moed days have reduced availability
- Pesach week (Nisan 15-22): Chol ha-moed days have reduced availability
- Yom Kippur (Tishrei 10): Entire country shuts down -- absolutely no scheduling
Medium Impact (schedule with caution)
- Pre-Rosh Hashanah week: Very busy with preparations
- Pre-Pesach week: Extremely busy (cleaning, shopping)
- Erev Chag (any holiday eve): Businesses close early, similar to Friday
- Post-holiday first day: "Recovery day" -- avoid critical meetings
Low Impact (mostly normal)
- Chanukah: Not a Yom Tov -- businesses open normally, but school events
- Purim: Not a Yom Tov -- some businesses may close, festive atmosphere
- Tu B'Shvat: Minor holiday -- normal business
- Lag B'Omer: Minor holiday -- bonfires evening before
Mourning Periods (restrict celebrations/events)
- Sefirat Ha-Omer: Between Pesach and Shavuot -- some restrict weddings/events
- Three Weeks (17 Tammuz - 9 Av): No weddings, concerts, or joyful events
- Nine Days (1-9 Av): Stricter restrictions on celebrations
Shabbat Timing by Season (Jerusalem)
| Month | Candle Lighting (approx.) | Havdalah (approx.) | Friday Business Close |
|---|---|---|---|
| January | 16:15 | 17:30 | 13:00-14:00 |
| February | 16:45 | 17:55 | 13:30-14:30 |
| March | 17:15 | 18:25 | 14:00-15:00 |
| April (DST) | 18:45 | 19:55 | 15:00-16:00 |
| May | 19:10 | 20:25 | 15:30-16:30 |
| June | 19:25 | 20:45 | 16:00-17:00 |
| July | 19:20 | 20:40 | 16:00-17:00 |
| August | 19:00 | 20:15 | 15:30-16:30 |
| September | 18:20 | 19:30 | 15:00-16:00 |
| October (DST end) | 17:40 | 18:50 | 14:00-15:00 |
| November | 16:10 | 17:20 | 13:00-14:00 |
| December | 16:05 | 17:20 | 13:00-14:00 |
City-specific candle-lighting minutes before sunset:
| City | b= value | Notes |
|---|---|---|
| Jerusalem | 40 | Ancient Jerusalem custom |
| Haifa, Zikhron Ya'akov | 30 | Local minhag |
| Tel Aviv, Beer Sheva, Eilat, Netanya, most other Israeli cities | 18 | Standard Hebcal default |
2026 Key Dates (Israel observance, verified May 2026)
| Holiday | Gregorian | Day of week |
|---|---|---|
| Pesach (first day) | April 2, 2026 (eve April 1) | Thursday |
| Pesach (last day) | April 8, 2026 | Wednesday |
| Yom HaShoah | April 14, 2026 | Tuesday |
| Yom HaZikaron | April 21, 2026 | Tuesday |
| Yom HaAtzmaut | April 22, 2026 | Wednesday (nidcheh, postponed one day) |
| Shavuot | May 22, 2026 (eve May 21) | Friday |
| 17 Tammuz fast | early July 2026 | start of the Three Weeks |
| Tisha B'Av | July 23, 2026 (eve July 22) | Thursday |
| Rosh Hashana | September 12 to 13, 2026 (eve September 11) | Saturday and Sunday; combined with the Shabbat that precedes it, creates a three-day no-work span |
| Yom Kippur | September 21, 2026 (eve September 20) | Monday |
| Sukkot (first day) | September 26, 2026 (eve September 25) | Saturday (Friday eve) |
| Sukkot (last day, chol ha-moed boundary) | October 2, 2026 | Friday |
| Shemini Atzeret / Simchat Torah | October 3, 2026 (eve October 2) | Saturday |
In 2026, Sukkot starts Friday evening and runs into Shabbat, and Shemini Atzeret falls on Friday-Saturday. These create extended no-work spans for Israeli businesses.
Havdalah Calculation
Hebcal default with M=on is Tzeit HaKochavim (sun 8.5 degrees below horizon, around 42 to 50 minutes after sunset in Israel). Fixed-minute alternatives via m=N:
m= value | Minhag |
|---|---|
m=42 | Three medium-sized stars |
m=50 | Three small stars |
m=72 | Rabbeinu Tam (stricter) |
m=0 | Suppress havdalah times |
HebCal API Quick Reference
Endpoints documented at https://www.hebcal.com/home/developer-apis. Rate limit: 90 requests per 10-second window (HTTP 429 on overflow).
Shabbat times:
GET https://www.hebcal.com/shabbat?cfg=json&gy=YEAR&gm=MONTH&gd=DAY&latitude=LAT&longitude=LON&tzid=Asia/Jerusalem&b=40&M=onUse b=40 for Jerusalem, b=30 for Haifa, b=18 elsewhere. M=on enables Tzeit HaKochavim havdalah; replace with m=42 / m=50 / m=72 for fixed minutes.
Holiday list (Israeli observance):
GET https://www.hebcal.com/hebcal?v=1&cfg=json&year=YEAR&month=x&maj=on&min=on&mod=on&i=onThe i=on flag is critical; without it you get diaspora 2-day Yom Tov.
Hebrew date converter:
GET https://www.hebcal.com/converter?cfg=json&gy=YEAR&gm=MONTH&gd=DAY&g2h=1Zmanim (halachic times like sunrise, midday, alot hashachar):
GET https://www.hebcal.com/zmanim?cfg=json&latitude=LAT&longitude=LON&tzid=Asia/Jerusalem&date=YYYY-MM-DD#!/usr/bin/env python3
"""Check Shabbat times and Israeli holidays for scheduling decisions.
A standalone utility for querying whether a given date/time falls within
Shabbat or an Israeli holiday, and for finding the next available business
slot in Israel.
Usage:
python check_shabbat.py # Check if now is Shabbat
python check_shabbat.py --date 2026-03-06 # Check a specific date
python check_shabbat.py --next-slot # Find next available slot
python check_shabbat.py --holidays 2026 # List holidays for a year
Requirements:
pip install requests pytz
"""
import argparse
import json
import sys
from datetime import datetime, timedelta, time
try:
import pytz
IL_TZ = pytz.timezone("Asia/Jerusalem")
except ImportError:
print("Warning: pytz not installed. Using UTC offsets.", file=sys.stderr)
IL_TZ = None
try:
import requests
except ImportError:
print("Error: requests library required. Install with: pip install requests",
file=sys.stderr)
sys.exit(1)
# Israeli business hours by weekday (Python weekday: 0=Monday ... 6=Sunday)
BUSINESS_HOURS = {
6: (time(8, 0), time(18, 0)), # Sunday (first Israeli business day)
0: (time(8, 0), time(18, 0)), # Monday
1: (time(8, 0), time(18, 0)), # Tuesday
2: (time(8, 0), time(18, 0)), # Wednesday
3: (time(8, 0), time(18, 0)), # Thursday
4: (time(8, 0), time(13, 0)), # Friday (half day)
5: None, # Saturday (Shabbat -- closed)
}
# Candle-lighting minutes before sunset by city minhag.
# Jerusalem uses 40 min, Haifa and Zikhron Ya'akov use 30 min, elsewhere 18 min.
CANDLE_LIGHTING_MIN = {
"jerusalem": 40,
"haifa": 30,
"zikhron_yaakov": 30,
"default": 18,
}
def candle_lighting_minutes(city=None, latitude=None):
"""Return the appropriate candle-lighting offset in minutes."""
if city and city.lower() in CANDLE_LIGHTING_MIN:
return CANDLE_LIGHTING_MIN[city.lower()]
# Heuristic: Jerusalem coords roughly latitude 31.76, longitude 35.21.
if latitude is not None and 31.70 <= latitude <= 31.85:
return CANDLE_LIGHTING_MIN["jerusalem"]
return CANDLE_LIGHTING_MIN["default"]
def get_shabbat_times(date=None, latitude=31.7683, longitude=35.2137,
tzid="Asia/Jerusalem", city="jerusalem"):
"""Get Shabbat candle lighting and havdalah times from HebCal API.
Args:
date: Date to check (default: today). Finds the nearest Friday.
latitude: Location latitude (default: Jerusalem).
longitude: Location longitude (default: Jerusalem).
tzid: Timezone ID (default: Asia/Jerusalem).
city: City key for candle-lighting minhag (jerusalem/haifa/zikhron_yaakov/None).
Returns:
Dictionary with 'candle_lighting' and 'havdalah' ISO datetime strings.
"""
if date is None:
date = datetime.now()
# Find next Friday
days_until_friday = (4 - date.weekday()) % 7
if days_until_friday == 0 and date.weekday() != 4:
days_until_friday = 7
friday = date + timedelta(days=days_until_friday)
b = candle_lighting_minutes(city=city, latitude=latitude)
response = requests.get("https://www.hebcal.com/shabbat", params={
"cfg": "json",
"gy": friday.year,
"gm": friday.month,
"gd": friday.day,
"latitude": latitude,
"longitude": longitude,
"tzid": tzid,
"b": b, # Candle lighting min before sunset (city-aware: 40/30/18)
"M": "on" # Havdalah at Tzeit HaKochavim (sun 8.5 deg below horizon)
})
response.raise_for_status()
data = response.json()
times = {}
for item in data.get("items", []):
if item["category"] == "candles":
times["candle_lighting"] = item["date"]
elif item["category"] == "havdalah":
times["havdalah"] = item["date"]
return times
def get_holidays(year):
"""Get all Israeli holidays for a given Gregorian year from HebCal API.
Args:
year: Gregorian year (e.g. 2026).
Returns:
List of holiday dictionaries with title, date, category, yomtov flag.
"""
response = requests.get("https://www.hebcal.com/hebcal", params={
"v": 1,
"cfg": "json",
"year": year,
"month": "x", # All months
"maj": "on", # Major holidays
"min": "on", # Minor holidays
"mod": "on", # Modern holidays
"i": "on", # Israeli holidays (1-day yom tov)
"nx": "off",
"ss": "off"
})
response.raise_for_status()
data = response.json()
holidays = []
for item in data.get("items", []):
if item["category"] in ("holiday", "roshchodesh"):
holidays.append({
"title": item["title"],
"date": item["date"],
"category": item.get("subcat", item["category"]),
"yomtov": item.get("yomtov", False),
"memo": item.get("memo", "")
})
return holidays
def is_business_day(date, holidays_cache=None):
"""Check if a date is a valid Israeli business day.
Args:
date: Date object to check.
holidays_cache: Optional list of holiday dicts from get_holidays().
Returns:
True if the date is a business day in Israel.
"""
# Saturday is always Shabbat
if date.weekday() == 5:
return False
# Check against holiday cache
if holidays_cache:
date_str = date.strftime("%Y-%m-%d")
for h in holidays_cache:
if h["date"].startswith(date_str) and h.get("yomtov", False):
return False
return True
def should_run_today(holidays_cache=None, skip_friday=False,
skip_erev_chag=False):
"""Determine if a scheduled job should run today.
Args:
holidays_cache: Optional list of holiday dicts.
skip_friday: Also skip Fridays (half days).
skip_erev_chag: Skip days before a holiday (erev chag).
Returns:
Tuple of (should_run: bool, reason: str).
"""
if IL_TZ:
today = datetime.now(IL_TZ).date()
else:
today = datetime.utcnow().date()
# Never run on Shabbat
if today.weekday() == 5:
return False, "Shabbat"
# Check holidays
if holidays_cache:
date_str = today.strftime("%Y-%m-%d")
for h in holidays_cache:
if h["date"].startswith(date_str) and h.get("yomtov", False):
return False, f"Yom Tov: {h['title']}"
# Check if tomorrow is Yom Tov (today is Erev Chag)
if skip_erev_chag:
tomorrow = today + timedelta(days=1)
tomorrow_str = tomorrow.strftime("%Y-%m-%d")
for h in holidays_cache:
if (h["date"].startswith(tomorrow_str) and
h.get("yomtov", False)):
return False, f"Erev Chag: {h['title']} tomorrow"
# Optionally skip Friday
if skip_friday and today.weekday() == 4:
return False, "Friday (half day)"
return True, "Business day"
def find_next_available_slot(start_date, duration_minutes=60,
holidays_cache=None,
preferred_hours=(9, 17)):
"""Find the next available business slot in Israel.
Args:
start_date: Date to start searching from.
duration_minutes: Required slot duration in minutes.
holidays_cache: Optional list of holiday dicts.
preferred_hours: Tuple of (start_hour, end_hour) for preferred range.
Returns:
Dictionary with date, day name, start time, and end time, or None.
"""
current = start_date
day_names = ["Monday", "Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday", "Sunday"]
for _ in range(60): # Search up to 60 days ahead
if not is_business_day(current, holidays_cache):
current += timedelta(days=1)
continue
hours = BUSINESS_HOURS.get(current.weekday())
if hours is None:
current += timedelta(days=1)
continue
open_time, close_time = hours
preferred_start = time(preferred_hours[0], 0)
preferred_end = time(preferred_hours[1], 0)
slot_start = max(open_time, preferred_start)
slot_end = min(close_time, preferred_end)
slot_start_dt = datetime.combine(current, slot_start)
slot_end_dt = datetime.combine(current, slot_end)
if (slot_end_dt - slot_start_dt).total_seconds() >= duration_minutes * 60:
return {
"date": current.strftime("%Y-%m-%d"),
"day": day_names[current.weekday()],
"start": slot_start.strftime("%H:%M"),
"end": slot_end.strftime("%H:%M"),
}
current += timedelta(days=1)
return None
def main():
parser = argparse.ArgumentParser(
description="Check Shabbat times and Israeli holidays for scheduling"
)
parser.add_argument(
"--date", "-d",
help="Date to check (YYYY-MM-DD format, default: today)"
)
parser.add_argument(
"--shabbat-times", action="store_true",
help="Get candle lighting and havdalah times for nearest Shabbat"
)
parser.add_argument(
"--holidays", type=int, metavar="YEAR",
help="List Israeli holidays for a given year"
)
parser.add_argument(
"--is-business-day", action="store_true",
help="Check if the date is an Israeli business day"
)
parser.add_argument(
"--next-slot", action="store_true",
help="Find next available business slot"
)
parser.add_argument(
"--duration", type=int, default=60,
help="Meeting duration in minutes (default: 60)"
)
parser.add_argument(
"--lat", type=float, default=31.7683,
help="Latitude (default: Jerusalem 31.7683)"
)
parser.add_argument(
"--lon", type=float, default=35.2137,
help="Longitude (default: Jerusalem 35.2137)"
)
parser.add_argument(
"--city", default="jerusalem",
choices=["jerusalem", "haifa", "zikhron_yaakov", "default"],
help="City minhag for candle-lighting (default: jerusalem = 40 min)"
)
args = parser.parse_args()
# Parse date
if args.date:
check_date = datetime.strptime(args.date, "%Y-%m-%d")
else:
check_date = datetime.now()
# Default action: check if today is a business day and get Shabbat times
if not any([args.shabbat_times, args.holidays, args.is_business_day,
args.next_slot]):
args.shabbat_times = True
args.is_business_day = True
results = {}
if args.shabbat_times:
try:
times = get_shabbat_times(
check_date, latitude=args.lat, longitude=args.lon,
city=args.city
)
results["shabbat_times"] = times
except Exception as e:
results["shabbat_times_error"] = str(e)
if args.holidays:
try:
holidays = get_holidays(args.holidays)
yom_tov_only = [h for h in holidays if h.get("yomtov", False)]
results["holidays"] = holidays
results["yom_tov_count"] = len(yom_tov_only)
except Exception as e:
results["holidays_error"] = str(e)
if args.is_business_day:
# Try to get holidays for validation
try:
holidays_cache = get_holidays(check_date.year)
except Exception:
holidays_cache = None
is_bday = is_business_day(check_date.date(), holidays_cache)
day_names = ["Monday", "Tuesday", "Wednesday", "Thursday",
"Friday", "Saturday", "Sunday"]
results["business_day_check"] = {
"date": check_date.strftime("%Y-%m-%d"),
"day": day_names[check_date.weekday()],
"is_business_day": is_bday
}
if args.next_slot:
try:
holidays_cache = get_holidays(check_date.year)
except Exception:
holidays_cache = None
slot = find_next_available_slot(
check_date.date(),
duration_minutes=args.duration,
holidays_cache=holidays_cache
)
results["next_available_slot"] = slot
print(json.dumps(results, ensure_ascii=False, indent=2))
if __name__ == "__main__":
main()
מתזמן מודע שבת
הנחיות
שלב 1: לזהות את הקשר התזמון
| הקשר | אילוצים עיקריים | דוגמאות |
|---|---|---|
| תזמון פגישות | שעות עבודה ישראליות (א'-ה'), שבת, חגים | "קבע פגישת צוות לשבוע הבא" |
| תכנון פריסה (deployment) | בלי פריסות בשבת, בחגים או בערבי חג | "מתי אפשר לפרוס את הגרסה?" |
| תכנון אירועים | מגבלות לוח שנה עברי, זמינות מקום | "תכנן אירוע השקת מוצר" |
| משימות cron/אוטומציה | לדלג על שבתות וחגים במשימות חוזרות | "הרץ משימה יומית חוץ משבת" |
| תזמון התראות | לא לשלוח בשבת או בשעות מאוחרות | "תזמן קמפיין התראות push" |
שלב 2: קבלת זמני הלכה ונתוני חגים
תשתמשו ב-HebCal API כדי לשלוף זמני שבת ונתוני חגים. תסתכלו על scripts/check_shabbat.py לכלי מוכן לשימוש.
שאילתת HebCal API לזמני שבת:
import requests
from datetime import datetime, timedelta
# דקות לפני שקיעה לפי מנהג העיר.
# ירושלים 40 דקות, חיפה וזכרון יעקב 30 דקות, שאר הערים 18 דקות.
CANDLE_LIGHTING_MIN = {
"jerusalem": 40,
"haifa": 30,
"zikhron_yaakov": 30,
"default": 18,
}
def get_shabbat_times(date=None, latitude=31.7683, longitude=35.2137,
tzid="Asia/Jerusalem", city="jerusalem"):
"""Get Shabbat candle lighting and havdalah times.
Default location: Jerusalem (40-min candle-lighting custom).
"""
if date is None:
date = datetime.now()
# Find next Friday
days_until_friday = (4 - date.weekday()) % 7
friday = date + timedelta(days=days_until_friday)
b = CANDLE_LIGHTING_MIN.get(city, CANDLE_LIGHTING_MIN["default"])
response = requests.get("https://www.hebcal.com/shabbat", params={
"cfg": "json",
"gy": friday.year,
"gm": friday.month,
"gd": friday.day,
"latitude": latitude,
"longitude": longitude,
"tzid": tzid,
"b": b, # דקות לפני שקיעה, תלוי עיר (40 / 30 / 18)
"M": "on", # הבדלה לפי צאת הכוכבים (השמש 8.5 מעלות מתחת לאופק)
# חלופה: m=42 / m=50 / m=72 לדקות קבועות אחרי השקיעה
})
data = response.json()
times = {}
for item in data.get("items", []):
if item["category"] == "candles":
times["candle_lighting"] = item["date"]
elif item["category"] == "havdalah":
times["havdalah"] = item["date"]
return timesקבלת כל החגים הישראליים לשנה:
def get_holidays(year):
"""Get all Israeli holidays for a given year."""
response = requests.get("https://www.hebcal.com/hebcal", params={
"v": 1,
"cfg": "json",
"year": year,
"month": "x", # All months
"maj": "on", # Major holidays
"min": "on", # Minor holidays
"mod": "on", # Modern holidays
"i": "on", # Israeli holidays (1-day yom tov)
"nx": "off",
"ss": "off"
})
data = response.json()
holidays = []
for item in data.get("items", []):
if item["category"] in ["holiday", "roshchodesh"]:
holidays.append({
"title": item["title"],
"date": item["date"],
"category": item.get("subcat", item["category"]),
"yomtov": item.get("yomtov", False),
"memo": item.get("memo", "")
})
return holidaysשלב 3: לוגיקת תזמון
שעות עבודה בישראל:
| יום | שעות | הערות |
|---|---|---|
| ראשון | 08:00-18:00 | יום ראשון בשבוע העבודה הישראלי |
| שני | 08:00-18:00 | יום עסקים רגיל |
| שלישי | 08:00-18:00 | יום עסקים רגיל |
| רביעי | 08:00-18:00 | יום עסקים רגיל |
| חמישי | 08:00-18:00 | יום עסקים רגיל |
| שישי | 08:00-13:00 | חצי יום - סגירה לפני שבת |
| שבת | סגור | שבת - אין פעילות עסקית |
פונקציית תזמון מרכזית:
from datetime import datetime, timedelta, time
import pytz
IL_TZ = pytz.timezone("Asia/Jerusalem")
BUSINESS_HOURS = {
6: (time(8, 0), time(18, 0)), # Sunday
0: (time(8, 0), time(18, 0)), # Monday
1: (time(8, 0), time(18, 0)), # Tuesday
2: (time(8, 0), time(18, 0)), # Wednesday
3: (time(8, 0), time(18, 0)), # Thursday
4: (time(8, 0), time(13, 0)), # Friday (half day)
5: None, # Saturday (Shabbat)
}
def is_business_day(date, holidays_cache=None):
"""Check if a date is a valid Israeli business day."""
if date.weekday() == 5: # Saturday
return False
if holidays_cache:
date_str = date.strftime("%Y-%m-%d")
for h in holidays_cache:
if h["date"].startswith(date_str) and h["yomtov"]:
return False
return Trueשלב 4: משימות cron מודעות חגים
def should_run_today(holidays_cache=None, skip_friday=False, skip_erev_chag=False):
"""Determine if a scheduled job should run today."""
today = datetime.now(IL_TZ).date()
# Never run on Shabbat
if today.weekday() == 5:
return False, "Shabbat"
# Check holidays
if holidays_cache:
date_str = today.strftime("%Y-%m-%d")
for h in holidays_cache:
if h["date"].startswith(date_str):
if h["yomtov"]:
return False, f"Yom Tov: {h['title']}"
# Check if tomorrow is Yom Tov (today is Erev Chag)
if skip_erev_chag:
tomorrow = today + timedelta(days=1)
tomorrow_str = tomorrow.strftime("%Y-%m-%d")
for h in holidays_cache:
if h["date"].startswith(tomorrow_str) and h["yomtov"]:
return False, f"Erev Chag: {h['title']} tomorrow"
if skip_friday and today.weekday() == 4:
return False, "Friday (half day)"
return True, "Business day"שלב 5: מודעות לתקופות טרום-חג ועונתיות
| תקופה | תאריכים (בערך) | השפעה על התזמון |
|---|---|---|
| ערב שבת (יום שישי) | כל שבוע | סגירה עד 13:00-15:00 לפי העונה |
| ערב ראש השנה | כספטמבר | העסקים סוגרים עד הצהריים |
| עונת ראש השנה + יום הכיפורים | א'-י' תשרי | 10 ימים של זמינות מופחתת |
| שבוע סוכות | ט"ו-כ"ב תשרי | הרבה אנשים בחופשה, חול המועד |
| שבוע טרום פסח | לפני ט"ו ניסן | עסוק מאוד, ניקיונות וקניות |
| שבוע פסח | ט"ו-כ"ב ניסן | הרבה אנשים בחופשה, חול המועד |
| בין המצרים (שלושת השבועות) | י"ז בתמוז עד ט' באב (סביב יולי-תחילת אוגוסט) | בלי חתונות, הופעות או אירועי חברה |
| תשעה באב | ט' באב (סוף יולי / תחילת אוגוסט) | יום צום; אצל רבים חצי יום עבודה או יום חופש |
| קיץ (יולי-אוגוסט) | יולי-אוגוסט | חופשת קיץ, פעילות עסקית מופחתת |
| שבת חורפית | נובמבר-פברואר | שבת מוקדמת, יום שישי מסתיים מוקדם יותר |
| שבת קיצית | מאי-אוגוסט | שבת מאוחרת, יותר זמינות ביום שישי |
תאריכי מפתח לשנת 2026 (כפי שמציינים בישראל):
| חג | תאריך גרגוריאני (בערך) | מה זה אומר ללוח |
|---|---|---|
| פסח | 1 עד 8 באפריל 2026 | יום ראשון וייום שביעי הם יום טוב, האמצע חול המועד |
| יום השואה | 13 עד 14 באפריל 2026 (מערב לערב) | יום זיכרון, מקומות בידור סגורים |
| יום הזיכרון | 20 עד 21 באפריל 2026 | יום זיכרון, מסחר מוגבל |
| יום העצמאות | 21 עד 22 באפריל 2026 | רוב העסקים סגורים |
| שבועות | 21 עד 22 במאי 2026 (מערב לערב) | יום טוב אחד בישראל |
| תשעה באב | 22 עד 23 ביולי 2026 (מערב לערב) | יום צום |
| ראש השנה | 11 עד 13 בספטמבר 2026 | יומיים יום טוב + שבת, בסך הכל שלושה ימים שבהם אין עבודה |
| יום כיפור | 20 עד 21 בספטמבר 2026 (מערב לערב) | המדינה משביתה |
| סוכות | 25 בספטמבר עד 2 באוקטובר 2026 | היום הראשון והאחרון הם יום טוב, האמצע חול המועד |
| שמיני עצרת ושמחת תורה | 2 עד 3 באוקטובר 2026 | יום אחד בישראל, יוצא בשישי-שבת |
התאריכים אומתו מול Hebcal לשנת 2026 (תצפית ישראלית). תמיד יש לבדוק מחדש כל שנה, כי הלוח העברי "זז" מול הגרגוריאני ב-11 עד 19 ימים. בשנת 2026 יום העצמאות נדחה ביום אחד (נדחה) בגלל קונפליקט עם יום הזיכרון.
דוגמאות
דוגמה 1: קביעת פגישה
המשתמש אומר: "קבע פגישת צוות לשבוע הבא" תוצאה: בודקים שעות עבודה ישראליות (א'-ה'), מאמתים שאין חגים, מציעים משבצות זמינות. נמנעים מיום שישי אלא אם בבוקר ומאשרים שזה לא ערב חג.
דוגמה 2: חלון פריסה
המשתמש אומר: "מתי הזמן הבטוח ביותר לפרוס השבוע?" תוצאה: מוצאים משבצת בשלישי או ברביעי (אמצע שבוע, הכי רחוק משבת), בשעות העבודה, לא לפני חג. ממליצים על פריסה בבוקר לזמן rollback מקסימלי לפני שבת.
דוגמה 3: Cron מודע חגים
המשתמש אומר: "הגדר דו"ח יומי שמדלג על שבתות וחגים" תוצאה: מגדירים cron עם בדיקת should_run_today(), מטמון חגים טעון מראש לשנה, עם לוגים לימים שדולגו.
משאבים מצורפים
סקריפטים
scripts/check_shabbat.py- כלי עצמאי לשליפת זמני שבת, חגים ישראליים וסטטוס יום עסקים דרך HebCal API. תומך בבדיקה האם תאריך הוא שבת/יום טוב, הצגת כל החגים לשנה, ומציאת המשבצת העסקית הפנויה הבאה עם משך ומיקום שאפשר לכוונן. הרצה:python scripts/check_shabbat.py --help
קובצי עזר
references/israeli-holiday-calendar.md- לוח החגים הישראלי המלא עם תאריכים עבריים, קירובים גרגוריאניים, רמות השפעה על התזמון (גבוהה/בינונית/נמוכה), מגבלות תקופות אבל, זמני הדלקת נרות שבת עונתיים לפי חודש לירושלים, ומדריך endpoints של HebCal API. תסתכלו בו כשמתכננים סביב חגים, קובעים זמני סגירה עונתיים של יום שישי, או בודקים אם אירוע מתנגש עם תקופת אבל.
מלכודות נפוצות
- הדלקת נרות שונה לפי עיר בישראל. ירושלים 40 דקות לפני שקיעה, חיפה וזכרון יעקב 30 דקות, ובשאר הערים 18 דקות. שימוש בערך אחיד לכל ישראל יחטיא את זמן הסיום של יום שישי ב-10 עד 22 דקות. מעבירים ל-API את הערך לפי העיר.
- לחגים ישראליים יש מגבלות עבודה שונות משבת. רוב החגים הם יום אחד בישראל אבל יומיים בחו"ל (ראש השנה הוא יומיים בשניהם). שימוש בלוח חגים של חו"ל יחסום ימי עבודה שהם בעצם חול המועד בישראל.
- בלוח העברי יש שנים מעוברות עם חודש נוסף (אדר ב'), שמתרחשות 7 פעמים במחזור של 19 שנה. סוכנים עלולים לחשב תאריכים לפי הלוח הגרגוריאני ולפספס את החודש הזה.
- שעות העבודה בישראל הן ראשון עד חמישי, ושישי הוא חצי יום (עד אחרי הצהריים מוקדם). שבת היא יום המנוחה השבועי, לא ראשון. סוכנים עלולים לתזמן פגישות בשישי אחרי הצהריים או דדליינים לבוקר יום שני.
- יום העצמאות ויום הזיכרון יכולים להידחות (נדחה) כשהתאריך הטבעי מתנגש עם שבת. בשנת 2026 התאריכים זזים בהתאם. כדאי לסמוך על דגל
i=onשל Hebcal ולא לחשב ה' באייר ידנית. - ברירת המחדל של Hebcal להבדלה היא צאת הכוכבים (השמש 8.5 מעלות מתחת לאופק, סביב 42 עד 50 דקות אחרי השקיעה בישראל). שומרי מנהג רבנו תם משתמשים ב-72 דקות. בוחרים את ערך
m=המתאים אם הקהל שלכם לא ברירת המחדל. - יום כיפור נחשב כמו שבת לצרכי תזמון (השבתה מלאה כולל עסקים, תחבורה ושידור בישראל). לא לפרוס ולא לתזמן כלום בחלון של 25 השעות האלה.
- בין המצרים (י"ז בתמוז עד ט' באב) היא תקופת אבל; חתונות, הופעות ואירועי חברה בדרך כלל נדחים. תשעת הימים (א' עד ט' באב) מחמירה יותר. זה לא יום טוב אבל זה חלון של "בלי חגיגות".
פתרון בעיות
שגיאה: "פגישה נקבעה בזמן שבת"
סיבה: אי-התאמה של אזור זמן - השרת ב-UTC, זמני שבת בשעון המקומי פתרון: תמיד להמיר לאזור הזמן Asia/Jerusalem לפני הבדיקה. זמני שבת משתנים לפי העונה והמיקום.
שגיאה: "חג לא זוהה"
סיבה: שימוש בלוח גרגוריאני בלבד בלי מיפוי של תאריכים עבריים פתרון: תשתמשו ב-HebCal API שמטפל בהמרה עברי-גרגוריאני. תשמרו במטמון נתוני חגים שנתיים ותרעננו בראש השנה.
שגיאה: "פגישת יום שישי מאוחרת מדי"
סיבה: זמן סיום קבוע של 17:00 ביום שישי בלי להתחשב בעונה פתרון: בחורף, שבת יכולה להתחיל כבר ב-16:00. תמיד תבדקו את זמן הדלקת הנרות בפועל ליום שישי הספציפי.
שגיאה: "זמן הדלקת נרות שגוי בירושלים"
סיבה: שולחים ל-Hebcal b=18 (ברירת המחדל) עם קואורדינטות של ירושלים, במקום מנהג ירושלים של 40 דקות. פתרון: שולחים b=40 כשהמשתמש בירושלים, b=30 לחיפה וזכרון יעקב, ו-b=18 בכל מקום אחר. Hebcal עצמו עובד באותה מוסכמה.
שגיאה: "זמן הבדלה חורג ב-8 עד 30 דקות"
סיבה: ערבוב בין M=on (צאת הכוכבים, השמש 8.5 מעלות מתחת לאופק, סביב 42 עד 50 דקות אחרי השקיעה) לבין הנחה קשיחה של "42 דקות" או "72 דקות". פתרון: בוחרים שיטה אחת ובאופן מפורש. M=on לברירת המחדל של Hebcal, m=42 לכוכבים בינוניים, m=50 לכוכבים קטנים, או m=72 למנהג רבנו תם המחמיר. מתעדים בקוד באיזו שיטה משתמש המתזמן כדי שסוכן אחר לא יוסיף עוד הסטה.
Related skills
How it compares
Use instead of naive UTC Friday blocks or static offsets that ignore Jerusalem 40-minute candle lighting and configurable Havdalah modes.
FAQ
Who is shabbat-aware-scheduler for?
Developers and small teams localizing automation, CRM sequences, or agent tasks for Israeli users who observe Shabbat and need API-backed times, not guesses.
When should I use shabbat-aware-scheduler?
Use it in Build when integrating Hebcal into your app; in Ship when testing that jobs suppress during candle lighting through Havdalah; and in Operate when adjusting cron or on-call bots after daylight or location rule changes.
Is shabbat-aware-scheduler safe to install?
Review the Security Audits panel on this Prism page and treat Hebcal API calls and any scheduler scripts as network-facing code you audit before production.