dosubot[bot] commented on issue #38216:
URL: https://github.com/apache/superset/issues/38216#issuecomment-3958157385

   <!-- Answer -->
   Thanks for the detailed comparison — this narrows it down significantly. 
Since beat is running and Report 1 executes fine, the issue is likely in how 
Report 2's schedule is being evaluated by the [cron window matching 
logic](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/tasks/scheduler.py#L60-L78).
   
   The scheduler uses a time window (controlled by 
`ALERT_REPORTS_CRON_WINDOW_SIZE`, default 59 seconds) to determine which 
reports should run. [If a report's crontab doesn't produce an execution time 
within that window, it's silently skipped with no log 
output](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/tasks/cron_util.py#L30-L51).
   
   **Things to check for Report 2:**
   
   1. **Compare crontab expressions** — Are they identical? Even subtle 
differences (like `0 16 * * *` vs `* 16 * * *`) affect window matching 
differently
   
   2. **Check `last_state`** in the database:
      ```sql
      SELECT last_state, last_eval_dttm FROM report_schedule WHERE name = 
'<Report2>';
      ```
      If it's stuck in `Working`, the report won't be re-queued
   
   3. **Verify timezone** — Both reports should have the same timezone string. 
The scheduler [converts times to the report's 
timezone](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/tasks/cron_util.py#L42)
 for cron evaluation
   
   4. **Test "Run Now"** on Report 2 from the UI — if it works, the issue is 
purely scheduling/timing related
   
   Can you share the crontab expressions and timezone settings for both reports?
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/f2c24330-c1aa-4436-b666-1872e488fd84?feedback_type=great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/f2c24330-c1aa-4436-b666-1872e488fd84?feedback_type=irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/f2c24330-c1aa-4436-b666-1872e488fd84?feedback_type=incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/f2c24330-c1aa-4436-b666-1872e488fd84?feedback_type=too_verbose)
 | 
[Hallucination](https://app.dosu.dev/response-feedback/f2c24330-c1aa-4436-b666-1872e488fd84?feedback_type=hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/f2c24330-c1aa-4436-b666-1872e488fd84?feedback_type=bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/f2c24330-c1aa-4436-b666-1872e488fd84?feedback_type=other)</sup>
   
   [![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Thanks%20for%20the%20detailed%20comparison%20%E2%80%94%20this%20narrows%20it%20down%20significantly.%20Since%20beat%20is%20running%20and%20Report%201%20executes%20fine%2C%20the%20issue%20is%20likely%20in%20how%20Report%202%27s%20schedule%20is%20being%20evaluated%20by%20the%20%5Bcron%20window%20matching%20logic%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/tasks/scheduler.py%23L60-L78%29.%0A%0AThe%20scheduler%20uses%20a%20time%20window%20%28controlled%20by%20%60ALERT_REPORTS_CRON_WINDOW_SIZE%60%2C%20default%2059%20seconds%29%20to%20determine%20which%20reports%20should%20run.%20%5BIf%20a%20report%27s%20crontab%20doesn%27t%20produce%20an%20execution%20time%20within%20that%20window%2C%20it%27s%20silent
 
ly%20skipped%20with%20no%20log%20output%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/tasks/cron_util.py%23L30-L51%29.%0A%0A%2A%2AThings%20to%20check%20for%20Report%202%3A%2A%2A%0A%0A1.%20%2A%2ACompare%20crontab%20expressions%2A%2A%20%E2%80%94%20Are%20they%20identical%3F%20Even%20subtle%20differences%20%28like%20%600%2016%20%2A%20%2A%20%2A%60%20vs%20%60%2A%2016%20%2A%20%2A%20%2A%60%29%20affect%20window%20matching%20differently%0A%0A2.%20%2A%2ACheck%20%60last_state%60%2A%2A%20in%20the%20database%3A%0A%20%20%20%60%60%60sql%0A%20%20%20SELECT%20last_state%2C%20last_eval_dttm%20FROM%20report_schedule%20WHERE%20name%20%3D%20%27%3CReport2%3E%27%3B%0A%20%20%20%60%60%60%0A%20%20%20If%20it%27s%20stuck%20in%20%60Working%60%2C%20the%20report%20won%27t%20be%20re-queued%0A%0A3.%20%2A%2AVerify%20timezone%2A%2A%20%E2%80%94%20Both%20reports%20should%20have%20the%20same%20timezone%20string.%20The%20scheduler%20%5Bconverts%20times%20to%20the%20report%
 
27s%20timezone%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset/tasks/cron_util.py%23L42%29%20for%20cron%20evaluation%0A%0A4.%20%2A%2ATest%20%22Run%20Now%22%2A%2A%20on%20Report%202%20from%20the%20UI%20%E2%80%94%20if%20it%20works%2C%20the%20issue%20is%20purely%20scheduling/timing%20related%0A%0ACan%20you%20share%20the%20crontab%20expressions%20and%20timezone%20settings%20for%20both%20reports%3F)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/issues/38216)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to