Can I delete all data from specific database at 12 AM?
Yes, just set it all up in Wix Job Scheduler
https://support.wix.com/en/article/corvid-scheduling-recurring-jobs
Corvid by Wix | How to Execute Timed Tasks with the Job Scheduler
Also, search this forum for job scheduler as it has been talked about before.
I can do that with:
import wixData from 'wix-data';
export function button7_click(event) {
wixData.truncate('grades')
}
and that delete ALL data in colection “grades”.