Skip to content

Bypass your website cache by adding timestamps

Your web server may cache your script output, rendering online cronjob ineffective. You should add __timestamp__ to your cronjob URL to bypass website cache.

For example, you set up a cronjob with the URL to call

https://example.com/cron.php?__timestamp__

or

https://example.com/cron.php?name=value&__timestamp__

Every time your cronjob runs, the __timestamp__ keyword will be replaced with a Unix timestamp:

https://example.com/cron.php?1725456136

or

https://example.com/cron.php?name=value&1725456136

Supported keywords

FastCron supports 3 keywords:

  • __timestamp__ will be replaced with the scheduled execution time (Unix timestamp)
  • __timestamp_ms__ will be replaced with the scheduled execution time (Unix timestamp in milliseconds)
  • __cronjob__ will be replaced with the cronjob ID

You can also add those keywords to your postData or payload when using HTTP method POST, PUT, or PATCH.

Bring your own variables

You can head to the Environment variables page, and add your own keywords/variables. For example, if you add a variable named token with the value SECRET, you can use __token__ in all your cronjobs, POST data, and payload.

Use it when:

  • you don’t want to share secrets with your team members.
  • you want to change it once and apply it to all cronjobs.

Auto update cronjob URLs

You can let us automatically add the __timestamp__ keyword to your cronjob URLs on the Account settings page.

Account settings

When FastCron detects website cache, it will update your cronjob URLs.