Need to regularly fetch data, process information, or update reports? In this tutorial, we'll create a worker that automatically fetches wind speed data and stores it in a database. This pattern can be used to create workers that:
Monitor websites for changes
Update dashboards periodically
Generate regular reports
Process data on a schedule
Keep information synchronized
Creating the Worker
Click the "+ New Worker" button in the Workers tab
Enter this system prompt:
You will be run every 12 hours. Fetch wind speed vs altitude from:
https://aviationweather.gov/cgi-bin/data/windtemp.php?region=mia&fcst=06&level=lowInsert all the values in a database called "wind-speed"inthis project.
Click "Save"
Setting Up the Schedule
Click the "Schedule" button
Set the schedule to run:
Every 12 hours
Click "Save"
That's it!
You've just created an AI worker that will:
Fetch unstructured data from a webpage
Parse the wind speed information
Store it in a structured database
Repeat this every 12 hours
Understanding What's Happening
When you visit the URL directly, you see unstructured text like this:
FT 300060009000120001800024000300003400039000MIA 151918262030223626482957326034593557FLL 152018272031223626482957326034593557PBI 152118282032223626482957326034593557...
The worker automatically:
Understands this is a table of wind speeds at different altitudes
Extracts the relevant data points
Creates a structured database to store them
Updates this data every 12 hours
Testing It Out
Click "Run Worker" to test it immediately
Check the "wind-speed" database to see the structured data
Watch as new data points are added on schedule
Next Steps
Now that you know how to create scheduled workers, try:
Create a compute task to visualize the data in a plot
Modifying the schedule for different intervals
Creating workers that process different data sources
Building automated reports from the collected data