Visser Labs – WooCommerce Plugins
  1. Home
  2. Knowledge Base
  3. WooCommerce Store Exporter Deluxe
  4. How to schedule exports by your local time

How to schedule exports by your local time

If you just want a Scheduled Export in Store Exporter Deluxe to run at a specific time in your own timezone, use the Timezone dropdown built into the Scheduling step. It’s covered in How to schedule exports in Store Exporter Deluxe, and it handles Daylight Saving Time changes for you automatically. You won’t need anything on this page for that case.

This article covers a different, more advanced case: triggering a scheduled export from a real server-level cron job (set up through cPanel or directly on a Linux server) instead of the plugin’s own scheduler. A server-level cron job always fires according to the server’s own clock, which is commonly set to UTC+0, regardless of the Timezone dropdown you’ve picked inside the plugin. So, to get that external cron job to fire at, say, 6 am your local time, you need to convert your local time to the server’s time yourself.

Prerequisites

RequirementDetails
PluginStore Exporter Deluxe is active and licensed
Scheduled ExportAlready created with the settings you want. See How to schedule exports in Store Exporter Deluxe if you haven’t set one up yet
Server-level cron accessAccess to your hosting cPanel, or command-line access to your server, to add a cron job

Converting your local time to the server’s time

To trigger a cron job at a specific local time, convert that local time to the offset your server’s cron uses, accounting for:

  • Your current timezone offset from UTC.
  • Daylight Saving Time (DST), if your region observes it.

Example: 6 am New Zealand time, three days a week

Say you want an export to run at 6:00 AM New Zealand time, every Monday, Wednesday, and Friday.

At the time of writing, New Zealand runs on UTC+12 (or UTC+13 during Daylight Saving Time). To schedule for 6:00 AM NZDT during Daylight Saving Time, subtract 13 hours to convert to UTC:

6:00 AM NZDT → 5:00 PM UTC (17:00) the previous day

Work out your own offset the same way, using your region’s current standard or daylight-saving offset from UTC.

Setting up the scheduled export in the plugin

Since the server-level cron job handles recurrence, don’t also set a recurring frequency in the plugin. Otherwise, you end up with duplicate export files.

Open WooCommerce → Store Export from the WordPress admin menu, then select Scheduled Exports from the EXPORTS section of the sidebar.

  1. Open the schedule you want to trigger externally.
  2. On the Scheduling step, set Frequency to Manual.
    • This removes the schedule’s own recurrence, timezone, and start-date settings.
    • It only runs when you trigger it yourself, either with Execute Now or the cron job you’re about to set up.
Store Exporter Deluxe Scheduling step, Frequency set to Manual, runs on demand only.

Setting up the server-level cron job

To trigger the export at your converted time, add a cron job through your hosting’s cPanel or directly on your Linux server.

Build the cron expression

Using the example above (6:00 AM NZDT, converted to 5:00 PM UTC the previous day, on Monday, Wednesday, and Friday), the cron expression is:

Minute : 0
Hour   : 17
Day    : *
Month  : *
Weekday: 0,2,4

Weekday numbering in cron starts at 0 for Sunday. Since the converted UTC time falls on the previous day, Monday/Wednesday/Friday NZDT lands on Sunday/Tuesday/Thursday UTC in this example. Work out your own weekday shift the same way if your conversion crosses midnight.

Build the trigger command

The cron job needs to call the same manual CRON export URL described in How to export via manual CRON:

curl "https://your-site.com/?action=woo_ce-cron&key=YOUR_SECRET_KEY&type=order&scheduled_export=100" > /dev/null 2>&1

Replace:

  • your-site.com with your own store’s domain.
  • YOUR_SECRET_KEY with the Export Secret Key you set in step 3 below.
  • type with the export type you configured (for example, order or product). This must be a valid export type, or the export fails with an ‘invalid export type’ error. Its value is then overridden by the export type saved on the scheduled export itself, so the scheduled export’s own settings always win.
  • 100 with your Scheduled Export ID. You can find this by hovering over the Edit link for that schedule on the Scheduled Exports screen: the URL ends with /scheduled-exports/edit/<ID>, where <ID> is the number you need.

For a full list of supported URL parameters, see How to export via manual CRON.

Turn on CRON access

  1. Open WooCommerce → Store Export → Settings and select the CRON Exports tab.
  2. Turn on the Enable CRON toggle.
  3. Enter a value in the Export Secret Key field. Leaving it empty allows unrestricted access to the trigger URL, so setting a key is recommended for any live store.
Store Exporter Deluxe Settings, CRON Exports tab, Enable CRON toggled on and Export Secret Key field empty.

Once the toggle is on and the cron job is added to your server, the export runs at your converted time and shows up under Recent Schedules on the Scheduled Exports screen.

Troubleshooting

My server-level cron job isn’t triggering the export
Confirm the cron job is actually installed and running on your server, separately from the plugin. Most hosting cPanels have a Cron Jobs section where you can view existing jobs and their last run time. If the job itself never runs, check with your hosting provider. If the job runs but the export doesn’t fire, visit the trigger URL directly in a browser to check for an error message, and confirm the Enable CRON toggle and Export Secret Key match what’s in the URL.
My export runs at the wrong time
Double-check your UTC conversion, including whether Daylight Saving Time applies on the date the job runs. Also confirm the Weekday value in your cron expression accounts for any day shift caused by the conversion, as shown in the example above.

FAQ

Do I need this if I only want my export to run at a set local time?
No. Use the plugin’s own Timezone dropdown on the Scheduling step instead. It’s built for exactly that case and handles Daylight Saving Time for you. This article’s approach is only for exports triggered by a real server-level cron job rather than the plugin’s own scheduler.
What happens if I leave the schedule’s Frequency set to something other than Manual while also using a server-level cron job?
The plugin also runs the export on its own internal schedule, in addition to your server-level cron job, which produces duplicate export files. Set Frequency to Manual so only your cron job triggers it.

Need more help?

If you’re using Store Exporter Deluxe and run into an issue this article doesn’t cover, open a support ticket and our team will help you get your export running at the right time.

If you’re using the free Store Exporter plugin, ask on the WordPress.org support forum and our team will get back to you there.

Was this article helpful?

Related Articles

Resources & Help