Feature: Cron Jobs

What are Cron Jobs?
Cron jobs are automated tasks. On Windows servers it is the Task Scheduler. There are two files in Maian Weblog that should be set up to run as cron jobs. These are detailed below.
1 System Ops
This performs the following operation:

- Activates blog system if offline and auto enable date is set
- Deletes journals / blogs which are set to auto delete
- Deletes categories (and journals) which are set to auto delete
- Activates journals / blogs that have a future publish date set
- Auto deletes pages that have an auto delete date set
- Auto deletes layout boxes that have an auto delete date set

You should set your cron to run based on the timeframes of the above operations. The file to run is:

control/cron/ops.php
2 Database Backup
In your admin control panel you have the option to download a backup schema. Backups are important, so this cron takes care of the backups automatically. Backups are emailed to the system admin addresses. If you prefer to suppress the emails and just have the backups saved to the server (admin/backups), you can deactivate the emails via the 'CRON_BACKUP_EMAIL' constant in the 'control/options.php' file. The file to run is:

control/cron/backup.php
Cron Job Example Commands
Examples of cron tab commands. These may or may not work, you should contact your host if you aren't sure. Make sure you use the correct paths to the files shown above. Here an example file is shown (xx.php).

Linux

/usr/local/bin/php /home/admin/domains/example.com/public_html/blog/control/cron/xx.php
php q /home/admin/domains/example.com/public_html/blog/control/cron/xx.php
/usr/local/bin/php q /home/admin/domains/example.com/public_html/blog/control/cron/xx.php

Windows

C:\Windows\php\php.exe "C:\server\www\blog\control\cron\xx.php"
If you don't understand this, contact your host for assistance. Path is almost always the FULL server path to the cron file.