What Are Cron Parameters?

I can't find in the documentation. What are cron options/parameters what you can run? And that if a default Cs-Cart installation would ever need to setup cron ever at all?

There're no articles in the CS-Cart documentation dedicated to cron specifically. We usually try to make it so that cron isn't necessary. When it is (or may be) necessary, CS-Cart interface usually shows what sort of command you can put into cron, and why.

One example off the top of my head is product import. If you import a CSV or XML file that is available by the same link and updates automatically every day, you may want to automate the import too. In that case, the import preset shows you a cron command like:

php /path/to/cart/admin.php -p --dispatch=advanced_import.import.import --preset_id=1

Once you add the command to cron and set the time period, the file will be imported automatically.

Thank you. Then is there a documentation on how to create custom cron scripts?

For example I want to write a cron script that will disable products which haven't been updated for a while and then delete them after a while.

There is no specific documentation. The easiest way is to create custom controller. E.g.


And call it with cron task

php /path/to/cart/index.php -p --dispatch=my_controller.process --cron_key=3hDcdff4fF

cron_key is not required, but we recommend you to use it. It's value should be checked in the controller