Bootstrapping Magento by calling:
require_once 'app/Mage.php';
Mage::app();
// Your code
This is the simplest way but not really the Magento way because we're not using class that extends Mage_Shell_Abstract - the class which when extended provides us with tools to parse command line arguments...
Magento way
File resides in shell/custom.php
<?php
require_once' abstract.php';
class Stackoverflow_Shell_Custom extends Mage_Shell_Abstract
{
protected $_argname = array();
public function __construct() {
parent::__construct();
// Time limit to infinity
...
View Status:
php indexer.php status
Reindex All
php indexer.php reindexall
Reindex Specific Index
php indexer.php --reindex CODE (see list below)
List of Individual Codes
IndexCodeProduct Attributescatalog_product_attributeProduct Pricescatalog_product_priceCatalog URL Rewritescatalog_u...