• Townie
    AI
  • Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
balloon

balloon

statusAutoMente

Periodically delete extraneous SQLite data generated by status
Public
Like
statusAutoMente
Home
Code
2
README.md
C
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
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.
Sign up now
Code
/
Code
/
Search
README.md

Status Auto Mente

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.

This Val is deleting SQLite data. Please understand what this means and remix.

The size of SQLite does not seem to have decreased, The deleted area is not released as free space.
But don't worry, the deleted space is reused.
You can use the VACUUM command to quickly reduce the size.
However, Val Town does not allow users to VACUUM command.


Usage

Remix this Val. That's it!

This Val assumes that you are using the default cron interval of 15 minutes.
If you have set the cron interval for a long time, the number of rows deleted will increase.
You need to set the value of '-3 days' to a larger number of days.


Check

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', '-3 days');
Cron
  • main.tsx
Code
README.md
C
main.tsx
FeaturesVersion controlCode intelligenceCLI
Use cases
TeamsAI agentsSlackGTM
ExploreDocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Terms of usePrivacy policyAbuse contact
© 2025 Val Town, Inc.