- Notifications
You must be signed in to change notification settings - Fork18
A5hleyRich/simple-automated-tasks
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
This is a repo for sharing how I manage automated tasks as part of the seriesHosting WordPress Yourself.
Copy the.tasks directory to your home directory:
.tasks - backups.sh - cron.sh - permissions.sh - sites.shsite1.com + backups + cache + logs + publicsite2.com + backups + cache + logs + publicsite3.com + backups + cache + logs + publicEnsure the bash scripts have execute permissionschmod +x backups.sh checksums.sh cron.sh permissions.sh sites.sh.
Updatesites.sh with the absolute path to where your site directories reside. Updatebackups.sh,checksums.sh,cron.sh andpermissions.sh with the absolute path of your sites.sh file.
Add each site to thesites.sh config file:
SITES=("site1.com""site2.com""site3.com")Add a cronjob for each individual taskcrontab -e. The following example will run WordPress cron every 5 minutes, perform backups daily at 5AM, update file permissions daily at 6AM and verify checksums at 7AM:
*/5 * * * * cd /home/a5hley/.tasks; bash cron.sh >/dev/null 2>&10 5 * * * cd /home/a5hley/.tasks; bash backups.sh >/dev/null 2>&10 6 * * * cd /home/a5hley/.tasks; bash permissions.sh >/dev/null 2>&10 7 * * * cd /home/a5hley/.tasks; bash checksums.sh >/dev/null 2>&1If you plan on sending backups to S3 you must alsoinstall and configure the AWS CLI tools.
The checksums task requires aPushbullet account, so that notifications are pushed to your computer, IOS or Android devices. Add yourAccess Token to thechecksums.sh file:
TOKEN=mytokenAbout
Easily manage automated server tasks for WordPress based sites.
Resources
Uh oh!
There was an error while loading.Please reload this page.