Log and execute Ruby code on a schedule
Recipe ToolsMarketingDeveloper Tool
What it does
When a specified interval triggers, this automation logs a message to the job report and then runs Ruby code. Someone can monitor the job report to see when the code executed and what happened.
Who it's for
Engineering teams who need to run Ruby scripts on a schedule and track execution in a job report.
How teams use this
Run a data cleanup script nightly
Execute Ruby code each night to remove old records or format data in a backend system. The job report shows whether the script succeeded, so someone can investigate if it fails.
Sync data between systems hourly
Run Ruby code on an hourly schedule to pull data from one system and push it to another. Logging to the job report lets someone verify the sync completed without checking both systems.
Add conditional logic to the script
Extend the Ruby code to check a condition, such as only running the cleanup if a flag is set or a threshold is met. The job report logs whether the condition was true so someone knows why the script did or did not execute.
How it works
- Start on a specified interval. The automation runs at the interval someone configures, such as every hour, daily, or weekly.
- Log message to job report. Workato Custom Code writes a message to the job report so someone can see when this automation ran and track its history.
- Execute Ruby code. The Ruby code runs and performs the task someone defined, such as data transformation or system integration.