I use WordPress. I have a php script I load into each post, via shortcode, that runs a 24 hour auction for the item in that post.
At the end of the auction I need to trigger an email function in the script which notifies the winning bidder.
I can’t depend on there being a user that will initiate a browser reload at that specific time. So I need an automatic way to do it without a browser.
I would like to programmatically create a crontab when the first person loads the page. It would simply wget the page every minute until perhaps a couple minutes after the auction ends. At which point I would programmatically delete the crontab.
Sooooo, does anyone know how to create a crontab using php??
I have tried this:
[code=php]exec(‘crontab -e * 20 * * * wget -q -O /dev/null “‘ . $url . ‘” >/dev/null 2>&1’);
But I can’t get any confirmation that it is working.
Any ideas would be greatly appreciated!