⏱️ Cron Job Status

This section helps administrators monitor and configure cron jobs that automate key backend tasks. Cron jobs ensure your platform runs smoothly without manual intervention.

Log Files

  • Each cron execution generates a log file with the format cron_YYYY-MM-DD.log.
  • Logs include timestamps, actions performed, and any errors encountered.
  • Click View next to each log to inspect its contents directly in the admin panel.

Required Cron Jobs

  • Import Feeds: import_feeds.php
    Runs daily (e.g., 3 AM). Checks each feed’s frequency and imports products accordingly.
  • Generate Sitemap: generate-sitemap.php
    Runs daily (e.g., 4 AM). Creates sitemap-index.xml in the public folder for SEO.
  • Refresh Homepage Products: refresh-product-pools.php
    Runs hourly. Optimizes homepage performance by preloading featured, discounted, and new products.

Optional Cron Job

  • FTP Feed Download: ftp-download.php
    Use this if you need to automatically download feed files from an FTP server (e.g., Rakuten).
    Downloaded files are saved in the /uploads folder and can be imported manually.
    To enable this, insert your FTP credentials directly into the ftp-download.php script.

How to Set Up Cron Jobs

  • You can add cron jobs via terminal or cPanel. Example terminal command:
    sudo crontab -e and add:
    0 3 * * * /usr/local/bin/php /home/your-site/public_html/cron/import_feeds.php
  • Adjust the PHP path based on your server:
    • /usr/local/bin/php
    • /usr/bin/php
    • /usr/bin/php82
    • php (if globally available)
  • To check your PHP version and path, use:
    • php -v
    • which php
    • whereis php

Manual Execution

  • You can manually run any cron script via terminal for testing. Example:
    php /home/your-site/public_html/cron/import_feeds.php force
  • This is useful for verifying setup or triggering immediate imports.

Best Practices

  • Ensure all required cron jobs are scheduled and running consistently.
  • Monitor log files regularly to catch errors or failed imports.
  • Use the FTP cron only if your affiliate network provides feeds via FTP.
  • Keep your PHP path and permissions up to date to avoid execution issues.