bedezign/yii2-audit

how to cleanup with cron ?

michaelnguyen2021 opened this issue · 2 comments

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 ?

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

For anyone else stumbling upon this...

There's now:

yii audit/cleanup --entrySolo

which cleans up only entries without attached data.