ComicsViewer/cron
2023-08-22 15:35:01 -04:00
..
.htaccess Add cron script for removing aged extracted comics 2023-08-22 15:35:01 -04:00
clearextracts.php Add cron script for removing aged extracted comics 2023-08-22 15:35:01 -04:00
README.md Add cron script for removing aged extracted comics 2023-08-22 15:35:01 -04:00

Scripts intended for use by cron

Scripts in this folder are intended to be run by cron, likely as the user running the web server process.

  • clearextracts.php: Used to purge the folder used for extracting comics for viewing by clients. It should be run by the web service owner and takes a single parameter for the number of days to keep extracts before removing them.
    • "su" to root: sudo su -
    • Run crontab as web server owner: sudo web -c "crontab -e"
    • Add crontab line with frequency and days/age parameter
      • 15 3 * * * /usr/local/bin/php /var/www/htdocs/comics/cron/clearextracts.php 5 1>/dev/null 2>&1