What is Cron and Crontab?

Cron is a daemon that runs scheduled commands. Crontab is the configuration file.

Each line in crontab has the format:

* * * * * command │ │ │ │ └── day of the week (0-7, 0 and 7 = Sunday) │ │ │ └──── month (1-12) │ │ └────── day of the month (1-31) │ └──────── hour (0-23) └────────── minute (0-59)

Practical Examples for SEO

Daily Indexing via IndexFast

If you use the IndexFast PHP script to send URLs via Google Indexing API:

# Run daily at 6:00 AM 0 6 * * * php /var/www/html/google_indexing.php >> /var/log/indexing.log 2>&1
💡 >> and 2>&1

The >> symbol appends the output to the log file. 2>&1 redirects errors there as well.

Updating Sitemap

# Update sitemap every 6 hours 0 */6 * * * php /var/www/html/generate_sitemap.php

Weekly SEO Audit

# Every Sunday at 3:00 — check broken links 0 3 * * 0 python3 /scripts/check_links.py >> /var/log/links_audit.log

Pinging Google after an update

# Ping Google every 30 mins about sitemap update */30 * * * * curl -s "https://www.google.com/ping?sitemap=https://yoursite.com/sitemap.xml" > /dev/null

How to Configure Crontab

  1. Connect to the server via SSH
  2. Open the crontab editor: crontab -e
  3. Add lines with tasks (format described above)
  4. Save the file (in nano: Ctrl+O, Enter, Ctrl+X)
  5. Check that the task is added: crontab -l

If you have no SSH access

Most hosting panels have a graphical interface for cron jobs.

⚠️ Important: Absolute Paths

Always specify absolute paths to executable files in cron.

Cron for Automatic Indexing with IndexFast

The IndexFast PHP script is perfect for cron. It:

  • Reads URLs from sitemap.xml
  • Sends them via Google Indexing API
  • Logs the results of each request
  • Stops when the daily quota (200 URLs) is reached

Want to do this without cron and SSH?

IndexFast PRO has a built-in scheduler — configure it directly in the dashboard.

🚀 Try for free →

Monitoring Cron Jobs

By default, cron sends output to root email. To get emails, add:

Or view the system log: grep CRON /var/log/syslog

← Previous Article Site Indexing After a Redesign Next Article → How to Check Site Indexing in Google in 2026