Custom Cron Error

I've written a custom script that checks for a CSV file in a specific location and updates inventory with the file contents. When cron executes this command:

php /path/to/custom.php

…I get an error:

exception 'Tygh\Exceptions\InitException' with message 'No storefronts defined for this domain'

Any suggestions for a workaround? Should I try to send a host header or tell CS-Cart that a storefront is not necessary?

Would need to see the content of your script. It probaby thinks you are in customer mode (AREA == 'C' by default) and hence is looking for the storefront.

We usually preface our addon cron scripts with (can vary depending on need):

define('AREA', 'A');
define('AREA_NAME', 'admin');
define('BOOTSTRAP', true);
define('ACCOUNT_TYPE', 'admin');
define('NO_SESSION', true);
define('CONSOLE', true); // 6/25/15 added to prevent seo from looking for SCRIPT_FILENAME
use Tygh\Registry;

Be nice if there was an easy API call to utilize addon cron scripts…