Cron Job
To send an electronic gift card to its recipient on the delivery date the sender chose, you need to set up a cron job that runs at least once a day to check for and send the gift cards due on that date.
Every host has its own way of setting up a cron job. If you are not sure how to set one up on your host, please contact your hosting provider for more information.
The general command to run the CM Gift Card cron job is:
wget https://yourdomain.com/index.php?option=com_cmgiftcard&task=cron.deliverElectronicCards&key=YOUR_SECRET_KEY_HERE > /dev/null 2>&1
or
curl https://yourdomain.com/index.php?option=com_cmgiftcard&task=cron.deliverElectronicCards&key=YOUR_SECRET_KEY_HERE > /dev/null 2>&1
Replace https://yourdomain.com with your site’s URL, and replace YOUR_SECRET_KEY_HERE with the secret key that you set in CM Gift Card’s configuration.
To test whether the URL above sends gift cards, you can open it directly in your browser. If any gift cards are sent, you get a message in this format:
Sent email for card #12345
If there are no gift cards to send, you get this message:
No electronic gift cards found