Categories


Archives


Recent Posts


Categories


Simulate a cron Enviornment

astorm

Frustrated by Magento? Then you’ll love Commerce Bug, the must have debugging extension for anyone using Magento. Whether you’re just starting out or you’re a seasoned pro, Commerce Bug will save you and your team hours everyday. Grab a copy and start working with Magento instead of against it.

Updated for Magento 2! No Frills Magento Layout is the only Magento front end book you'll ever need. Get your copy today!

Debugging cron jobs is one of my least favorite activities. This clever tip over on Stack Overflow shows how to use cron and the env generate the enviornmental variable your system’s cron runs under, which in turn will let you pretend to be the cron job. (This won’t help you if you’re using a PHP system that layers its own cron system on top of unix cron — we weep with you in solidarity)

Copyright © Alana Storm 1975 – 2023 All Rights Reserved

Originally Posted: 7th December 2017

email hidden; JavaScript is required