Log and monitor a Ruby wait timer every 5 minutes
Recipe ToolsMarketingDeveloper Tool
What it does
When the clock triggers every 5 minutes, this automation logs a message and executes Ruby code to wait for a specified time. If an error occurs, the job stops without retrying; otherwise, it logs the completion to the Job report.
Who it's for
Engineering teams who need to run timed operations with error monitoring and detailed job reporting.
How teams use this
Monitor scheduled background tasks
Run a timed operation every 5 minutes with error detection and job logging. The team can review the Job report to see when each cycle ran and whether it succeeded.
Run operations on a different schedule
Change the clock trigger from 5 minutes to a different interval based on workload needs. The Ruby wait code and error handling remain the same for the new schedule.
Add conditional retry logic on error
Extend the error handler to check the error type and retry only for specific conditions, such as timeouts. Set a retry counter and log each attempt to the Job report.
How it works
- Start on a 5-minute interval. The clock starts this automation every 5 minutes so the timed operation runs on schedule.
- Log the cycle start. Workato Custom Code logs a message to the Job report so the team can track when each cycle begins and review the history.
- Execute Ruby code to wait. Workato Custom Code runs the Ruby code that pauses for the specified time. If an error occurs, the job stops without retrying.
- Log completion to Job report. Workato Custom Code logs a final message to the Job report so the team sees the cycle finished without errors and can verify success.