Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Integrate Time API for Accurate Cron Job Scheduling #508

Open
tholulomo opened this issue Aug 13, 2024 · 0 comments · May be fixed by #511
Open

Integrate Time API for Accurate Cron Job Scheduling #508

tholulomo opened this issue Aug 13, 2024 · 0 comments · May be fixed by #511

Comments

@tholulomo
Copy link
Contributor

Description:
We are experiencing server crashes during the day, which is suspected to be caused by our nightly cron job running at the wrong time. To address this, we need to integrate an API that provides the current time in the US/Eastern time zone at server start. This will allow us to calculate the time remaining until midnight and schedule the cron job accordingly. This implementation will help ensure the cron job runs at the intended time, potentially resolving the server crash issue.

Tasks:

  1. Access the Swagger Documentation for Timeapi.io
  2. API Integration:
    • Implement code to call the API at server start to fetch the current time in the US/Eastern time zone.
    • Calculate the time remaining until midnight based on the API response.
  3. Schedule Cron Job:
    • Schedule the cron job to trigger once the calculated time until midnight is reached.
  4. Enhanced Logging:
    • Improve the logging mechanism to capture more detailed information about the server's state during crashes, including memory usage and CPU load.
  5. A/B Testing:
    • Conduct an A/B test comparing the current scheduling method with the API-based scheduling to evaluate effectiveness and cost-efficiency.
  6. Review Results:
    • Analyze the results from the A/B test to determine if the API integration resolves the issue.

Acceptance Criteria:

  • The Swagger documentation is access.
  • The server calls the API at start-up and correctly fetches the current time in the US/Eastern time zone.
  • The time remaining until midnight is accurately calculated.
  • The cron job is scheduled to run at the calculated time.
  • Logs provide detailed information on server performance and state during crashes.
  • A/B testing is completed, and results are reviewed to confirm the effectiveness of the solution.

Priority: High

@tholulomo tholulomo linked a pull request Aug 20, 2024 that will close this issue
tholulomo added a commit that referenced this issue Aug 20, 2024
tholulomo added a commit that referenced this issue Oct 21, 2024
tholulomo added a commit that referenced this issue Oct 27, 2024
tholulomo added a commit that referenced this issue Oct 27, 2024
tholulomo added a commit that referenced this issue Oct 27, 2024
tholulomo added a commit that referenced this issue Oct 27, 2024
tholulomo added a commit that referenced this issue Oct 29, 2024
tholulomo added a commit that referenced this issue Nov 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant