bedezign / yii2-audit

Yii2 Audit records and displays web/cli requests, database changes, php/js errors and associated data.
https://bedezign.github.io/yii2-audit/
Other
193 stars 112 forks source link

how to cleanup with cron ? #243

Closed michaelnguyen2021 closed 6 years ago

michaelnguyen2021 commented 6 years ago

I setup a cron job that do cleanup everyday.

0 12 * * * php yii audit/cleanup --age=30

The cleanup script requires user input to proceed

Cleanup the above data? (yes|no) [no]:

How do I do that with cron ?

Blizzke commented 6 years ago

audit follows yii guidelines in this matter, you can use the --interactive=0 option that is available for most commands

schmunk42 commented 3 years ago

For anyone else stumbling upon this...

There's now:

yii audit/cleanup --entrySolo

which cleans up only entries without attached data.