Public
Like
statusAutoMente
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Viewing readonly version of main branch: v18View latest version
For the free plan, SQLite has a capacity of 10MB.
Therefore, you need to work on the deletion of unwanted data on a regular basis.
This Val deletes SQLite data that is never used by the Status Val.
Change the '-51 hours' in main.tsx according to the cron interval.
- 15 minutes: -51 hours
- 30 minutes: -101 hours
- 1 hour: -201 hours
- 3 hours: -603 hours
- 6 hours: -1206 hours
- 12 hours: -2412 hours
- 24 hours: -4824 hours
status (HTTP trigger) defaults to limit 200, so it doesn't make sense to have more rows than this.
Therefore, you can remove the extra number of rows.
Enter the following SQL command from SQLite Management and check that there is no output (Default: Every 15 minutes):
select * from uptime where timestamp < datetime('now', '-51 hours');