Create your own scripts to be run by cron
From PhpCOIN Documentation
phpCOIN v1.2.1b dated 2004-08-07 and later versions handles recurring processes (scripts to be run by cron) a little differently than previous versions.
1) All files to be run by cron must be placed in the /coin_cron folder
2) The header of the file must have some "where are we" code:
# Set cron filename
$cronfile = 'invoices.php';
# Change directory
$_pth = str_replace("\\", '/', realpath($argv[0]));
$_pth = str_replace($cronfile, , $_pth);
$_pth = str_replace('/coin_cron', , $_pth);
chdir($_pth);
# include the "where are we" code
require_once('cron_config.php');
Replace the $cronfile value with the filename of your script. The cron_config.php file will figure out where your script is located, and make available to your script the following DEFINEs:
BASE_HREF is the complete URL to phpCOIN
$_PACKAGE['PATH'] is the directory location of phpCOIN, relative to the web-server root
PKG_PATH_BASE is the file-system location of the phpCOIN directory.
When including files, this should prepend the path/filename to include
because it will work on both Windows and *nix.
All path variables use forward slashes regardless of *nix or Windows. This makes it easier for you to parse these variables if your script needs to.
If you want your script to have access to all the phpCOIN variables and common functions, before you get into the rest of your code also insert:
# Include core file
require_once(PKG_PATH_INCL.'core.php');

