Bulk update Pathauto node aliases through cron job

  1. Put the following content into a PHP file(e.g. cron-update-pathauto.php) and put the file in your drupal's root directory.
    <?php
    include_once './includes/bootstrap.inc';
    include_once './sites/all/modules/pathauto/pathauto.inc';
    include_once './sites/all/modules/pathauto/pathauto_node.inc';
     
    drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
     
    _pathauto_include();
    // variable_set('pathauto_max_bulk_update', 5000);
    node_pathauto_bulkupdate();
    ?>  
     
  2. Create a cron job to call this file at your desired interval. For example, the following cron job will call the file at the beginning of every hour.
    0 * * * * curl --silent --compressed http://yoursite.com/cron-update-pathauto.php > /dev/null 2>&1