You don't want to login every night to disable subscriptions or send reminders, so a crontab can do this job for you. Wha tdoes the cron do? Disabeling subscriptions, send reminders, cleaning the orders table, removing coupons and sending out mailings..
Crontabs
We have to create 2 crontabs;
- 1 - http://yourdomain.com/index.php?option=com_rdsubs&view=cron&task=runCron
- 2 - http://yourdomain.com/index.php?option=com_rdsubs&view=cron&task=dailyCron
Crontab 1 can be executed as often as you like, it is being used to send out emails which can be send during the day. Example, you have send a news letter to your customers and the component is able to do this for you. Execute the 1st one and it wil send out batches of 100 emails per xx time.
Crontab 2 is executed once per day and is disabeling subscriptions, cleaning the orders table, sending out reminders, disabeling coupons and so on. Everything what needs to be done at the nightly cron. The best time to execute this cron is directly after midnight.
We assume you know how to set up a crontab on your server, otherwise you have to ask your host how to do this or read their documentation how to set up crontabs.
Crontab Security
As the crontab system is being called by an URL (CLI script is coming soon) we have to proctect the crontab by a password. In the configuration you are able to set a password for your crontabs so they cannot be accessed by a user, bot or anything else without knowing the key/password.
Setting the password:
- Go to the Component Configuration
- Choose the tab "Automation"
- Set the password and save the configuration.
Once you have set the password, you have to change the URI's to the crontab:
- 1 - http://yourdomain.com/index.php?option=com_rdsubs&view=cron&task=runCron&key=[YOURPASSWORD]
- 2 - http://yourdomain.com/index.php?option=com_rdsubs&view=cron&task=dailyCron&key=[YOURPASSWORD]
Crontab Providers
If you don't have the ability to run crons at your server, you might want to use one of the crontab services that are available on the internet. Webcron (or online cron service) brings huge convenience to users on quickly setting up cron job to trigger periodical tasks. Here are 2 webcrons that are pretty good intheir servcies:
- https://www.easycron.com
- https://www.setcronjob.com/
-