-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.yaml
More file actions
25 lines (19 loc) · 821 Bytes
/
render.yaml
File metadata and controls
25 lines (19 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
services:
cron:
type: cron
schedule: "*/10 * * * *"
script: |
#!/bin/bash
PING_URL="https://fullstack-scrapy.onrender.com/api/scrape"
GET_URL="https://fullstack-scrapy.onrender.com/api/scrape?keyword="
# Log the start of the ping and GET request
echo "$(date) - Starting ping for $PING_URL and GET request for $GET_URL" >> ./.logs/ping.log
# Execute the ping command and redirect output to log file
curl -sL --output /dev/null "$PING_URL" 2>&1 >> ./.logs/ping.log
# Make the GET request and append response to log file
curl -sL -o - "$GET_URL" >> ./.logs/ping.log
# Log the end of the ping and GET request
echo "$(date) - Finished ping and GET request" >> ./.logs/ping.log
working_dir: ./
volumes:
- ./.logs/ping.log:./.logs/ping.log