Scheduler duration/ runtime

Scheduler can be on demand as well, when i want to refresh DB with latest data, I can just got the API, open database and run query to show the count of records and last date the data request API was hot, another container in NoSQL database called scheduler_metadata can be added for this.

strategies to keep track of last entry in Scheduler

  1. Database or persistent storage: You can store the details of the last entry in a database or any other persistent storage mechanism. Whenever a new entry is scheduled, you update the record in the storage with the latest information. This way, you can retrieve the last entry whenever needed.

  2. File system: Another option is to store the details of the last entry in a file. Whenever a new entry is scheduled, you update the file with the latest information. This approach is suitable for simple scenarios but may not be as efficient as using a database for larger scale applications.

  3. In-memory cache: If you don’t require the last entry to persist across system restarts or if you need quick access to the information, you can store the last entry in an in-memory cache. Each time a new entry is scheduled, you update the cache with the latest information. This approach is suitable for scenarios where the last entry information is frequently accessed and doesn’t need long-term persistence.

  4. Variables or state within the scheduler: Depending on the scheduler implementation, you may be able to maintain a variable or state within the scheduler itself to track the last entry. This approach is specific to the scheduler framework or library you are using and may require custom coding or configuration.

The choice of approach depends on your specific requirements and the technology stack you are using. Consider factors such as scalability, persistence needs, and the availability of the necessary storage or caching mechanisms in your environment.