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:
- Access the Swagger Documentation for Timeapi.io
- 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.
- Schedule Cron Job:
- Schedule the cron job to trigger once the calculated time until midnight is reached.
- Enhanced Logging:
- Improve the logging mechanism to capture more detailed information about the server's state during crashes, including memory usage and CPU load.
- A/B Testing:
- Conduct an A/B test comparing the current scheduling method with the API-based scheduling to evaluate effectiveness and cost-efficiency.
- 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
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:
Acceptance Criteria:
Priority: High