Clean Every 30 Minutes Before 24h Completed Jobs #4331
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Clean Every 30 Minutes Before 24h Completed Jobs | |
on: | |
schedule: | |
- cron: '30 * * * *' | |
env: | |
BULL_AUTH_KEY: ${{ secrets.BULL_AUTH_KEY }} | |
jobs: | |
clean-jobs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Send GET request to clean jobs | |
run: | | |
response=$(curl --write-out '%{http_code}' --silent --output /dev/null --max-time 180 https://api.firecrawl.dev/admin/${{ secrets.BULL_AUTH_KEY }}/clean-before-24h-complete-jobs) | |
if [ "$response" -ne 200 ]; then | |
echo "Failed to clean jobs. Response: $response" | |
exit 1 | |
fi | |
echo "Successfully cleaned jobs. Response: $response" |