Crontabs
For Deserted Chateau, two types of cronjobs need to be added:
Crontab for all webservers
These cronjobs perform maintenance for the given server.
# Add the below lines to your Bitnami LAMP server's root crontab.
# These lines should be added to ALL servers, including the primary cronjob server.
# Delete temporary server uploads.
0 1 * * * /opt/bitnami/apache/htdocs/src/Cronjobs/DeleteTempUploads.sh >> /opt/bitnami/apache/htdocs/logs/cronexlogs/DeleteTempUploads.log 2>&1
Crontab for one server only
These cronjobs perform database maintenance, and therefore must only run on one server to avoid possible race conditions or incorrect database values.
# Add the below lines to your Bitnami LAMP server's root crontab.
# NOTE: These cronjobs are only to be run on one server, to ensure database consistency.
# The individual server crontab should be added to this for the primary cronjob server.
# Check the AWS SQS queue for undeliverable emails, and add records of this to the database.
0 * * * * /opt/bitnami/apache/htdocs/src/Cronjobs/CheckEmailErrorQueue.sh >> /opt/bitnami/apache/htdocs/logs/cronexlogs/CheckEmailErrorQueue.log 2>&1
# Clear old login history entries in the database.
0 0 1 * * /opt/bitnami/apache/htdocs/src/Cronjobs/RemoveOldLoginHistory.sh >> /opt/bitnami/apache/htdocs/logs/cronexlogs/RemoveOldLoginHistory.log 2>&1
# Deactivate users who have asked to deactivate their account after a given period.
0 0 2 * * /opt/bitnami/apache/htdocs/src/Cronjobs/DeactivateUsersDueForDeactivation.sh >> /opt/bitnami/apache/htdocs/logs/cronexlogs/DeactivateUsersDueForDeactivation.log 2>&1