 |
The crontab command, found in Unix and Unix-like operating systems, is used to schedule commands to be executed periodically.
It reads a series of commands from standard input and collects them into a file known also known as a "crontab" which is later read and whose instructions are carried out.
These tasks are known as 'Cron Jobs'.
There are 5 tasks in the script that benefit from Cron Jobs. They are as follows:
- Automatically send e-cards specified for advanced dates.
- Automatically delete e-cards from the system after a specified amount of days.
- Automatically remove inactive accounts after a specified period of time.
- Automatically send reminders on the given date.
- Automatically delete unused uploaded images after 24 hours.
All of these functions can be run manually from the admin area, but for the first option,
this will require you to log in to your admin panel every day. Information to run each cron is show below:
|
1. If you have the advanced date option enabled, visitors can choose to send an e-card in advance up to the amount
of days you specify in your settings.
2. Your cron job needs to execute the following file daily:
http://www.yoursite.com/ecards/cron/advanced_date.php |
On some servers, the following command may work:
php -q /home/server/path/public_html/ecards/cron/advanced_date.php |
3. If you cannot set up a cron job, you can run this manually by selecting 'E-Cards/Date Options'
from the main menu in your admin area. The script will tell you if you have any e-cards to send for that particular day. If
you do have any, click the 'Send E-Cards' button to send them.
|
1. If you have the option in your settings to delete cards from the server after X amount of days, you can
run a cron job to do this automatically. NOTE this does NOT delete any images from the server.
2. Your cron job needs to execute the following file every X amount of days:
http://www.yoursite.com/ecards/cron/delete_ecards.php |
On some servers, the following command may work:
php -q /home/server/path/public_html/ecards/cron/delete_ecards.php |
3. If you cannot set up a cron job, you can run this manually by selecting 'E-Cards/Date Options'
from the main menu in your admin area. You can select to delete all e-cards, or sent or unsent ONLY older than a specified amount
of days.
4. IMPORTANT! The 'delete_cards.php' file will automatically select to delete ALL e-cards XX days old. If
you want to change this to 'Sent' or 'Unsent' ONLY, open the 'delete_cards.php' file in a text editor and edit the purge preference at the
top of the file.
|
1. Innactive acounts are accounts that have NOT been verified. Inactive accounts sit in your database indefinitely, doing nothing. This options enables you to auto delete them if they have not
been verified after a specified period of days.
2. Your cron job needs to execute the following file every X amount of days:
http://www.yoursite.com/ecards/cron/delete_inactive.php |
On some servers, the following command may work:
php -q /home/server/path/public_html/ecards/cron/delete_inactive.php |
3. If you cannot set up a cron job, you can run this manually by selecting 'Members/Inactive Accounts'
from the main menu in your admin area.
4. IMPORTANT! The 'delete_inactive.php' file will automatically delete inactive accounts after 30 days. If
you want to change this, open the 'delete_inactive.php' file in a text editor and edit the duration option at the top of the file.
|
1. If you have the 'Reminders' option enabled in your settings, members can add reminders into the system and
be notified on the given date.
2. Your cron job needs to execute the following file daily:
http://www.yoursite.com/ecards/cron/send_reminders.php |
On some servers, the following command may work:
php -q /home/server/path/public_html/ecards/cron/send_reminders.php |
3. If you cannot set up a cron job, you can run this manually by selecting 'E-Cards/Date Options'
from the main menu in your admin area. The script will tell you if you have any reminders to send for that particular day. If
you do have any, click the 'Send Reminders' button to send them.
|
1. Unused uploaded images are images that have been uploaded, but not sent as e-cards. If a member uploads an image and then leaves the system, they may have to upload the image again. To keep the system up to date its a good idea to clear the unused images.
2. Your cron job needs to execute the following file every X amount of days:
http://www.yoursite.com/ecards/cron/delete_uploads.php |
On some servers, the following command may work:
php -q /home/server/path/public_html/ecards/cron/delete_uploads.php |
3. If you cannot set up a cron job, you can run this manually by selecting 'Members/User Uploads'
from the main menu in your admin area.
4. IMPORTANT! The 'delete_uploads.php' file will automatically delete images 2 days older than the current day. This allows for time differences in certain countries. If
you want to change this, open the 'delete_uploads.php' file in a text editor and edit the duration option at the top of the file.
|
If the above made no sense to you, you need to ask your web hosting company the procedure to set up a crontab.
|

|
|