-
Notifications
You must be signed in to change notification settings - Fork 528
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
Usecase for triggering a rule at a certain time everyday #1812
Comments
I can help to solve this issue @madhurijain97 |
steps to solve this issue 👍 " First step " "Second step" Here's how you can achieve your use case:
Here's an example Siddhi application to illustrate this: @app:name("MissingEventDetectorApp") define stream InputStream (key string); -- Window to detect missing events for 5 minutes (300 seconds) -- Define your alerting logic here, for simplicity, let's just log the missing event -- Trigger to start window processing at 2 PM every day in PST timezone -- Start the processing of the window at the trigger time note In this example: The InputStream stream represents your input data. note Remember to adjust the cron expression, window duration, and timezone according to your specific requirements. Additionally, you may need to implement your own logic for handling alerts based on inactive time. |
Description:
I have a usecase where we want a sql to run at a certain time everyday depending on different timezones. I see that we have triggers, but they are for injecting events and not for when to run the sql.
For eg.
I want to detecting missing events for 5 minutes and want this to be triggered at 2pm PST everyday. Documentation doesn’t have details related to this.
from not inputStream[key == "1234"] for 300 sec select "1234" as key insert into outputStream
Note: I need this to be run at a specific time everyday since this rule sends out alerts only once and we have certain logic in place to filter out the alerts based on inactive time.
Is it possible to have a query that does the following?
from not inputStream[key == "1234"] for 300 sec select "1234" as key insert into outputStream RUN_AT <TIME> TIMEZONE <TIMEZONE>
Affected Siddhi Version:
OS, DB, other environment details and versions:
Steps to reproduce:
Related Issues:
The text was updated successfully, but these errors were encountered: