Skip to content

Commit

Permalink
Daily cleanup script
Browse files Browse the repository at this point in the history
  • Loading branch information
TinoDidriksen committed Feb 8, 2024
1 parent d84b560 commit 2515fc4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions _bin/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Require all denied
5 changes: 5 additions & 0 deletions _bin/cron-daily.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash
set -e

cd ~/public_html/_inc
echo "begin; select count(*) from translations; delete from translations where t_atime < strftime('%s', 'now') - 86400 and t_id not in (select distinct t_id from shares union select distinct t_id from feedback); commit; select count(*) from translations;" | sqlite3 -echo nutserut.sqlite > ~/cron-daily.log

0 comments on commit 2515fc4

Please sign in to comment.