Skip to content

rakurtz/cleanup_oc_files_lock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

cleanup_oc_files_lock.py

Python script to get rid of old entries in Nextclouds oc_files_lock table created by rakurtz in 2024

Requirements:

pip install mysql-connector-python

Database cofiguration:

create an unpriviled user for this task!

CREATE USER 'cleanup_user'@'localhost' IDENTIFIED BY 'some_password';
GRANT SELECT, DELETE ON nextcloud.oc_files_lock TO 'cleanup_user'@'localhost';

adjust the script to your needs:

# My script params
time_delta_in_hours = 24
notify_to_email = "[email protected]"

add to crontab via crontab -e to be daily run at midnight

0 0 * * * /usr/bin/python3 /path/to/cleanup_oc_files_lock.py

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages