If you want to use the Synchronize to WordPress/AD feature you need to set up a cron job.On Windows operating systems you have to use the Windows Task Scheduler to accomplish this.

This how-to is specific for Next Active Directory Integration. Please see this article how to add cron jobs and scheduled tasks on Windows.

Add the scheduled task

  • On your Windows server log on with a privileged account, e.g. Administrator
  • Go to Start > Control Panel > System and Security > Administrative Tools > Task Scheduler
  • In the right panel click on Create Basic Task
  • Enter a name like 'Sync to WordPress* and click Next
  • On the next page define the scheduled dates when the task has to run. Every night should be often enough.
  • On the Action page select Start a program

Using PowerShell

How to setup a cron job on windows server
  • PowerShell is available on Windows 7 and later, as well as on Windows Server 2008 R2 and later

  • The Program/script input field must contain powershell

  • The input field Add arguments (optional) must be populated with the following command

  • Some parameters must be adjusted e.g. ###SERVERURL### (must point to the WordPress instance), ###TOKEN### (must contain your auth code)

Make sure you logged on as an administrator or you have the same access as an administrator. Start - Control Panel - System and Security - Administrative Tools - Task Scheduler. Action - Create Basic Task -Type a name and Click Next. Follow through the wizard.

In case you are using Kerberos authentication, you have to append the Parameter -UseDefaultCredentials to the Invoke-WebRequest. You also have to make sure that the user under which the scheduled task is running, has a valid Kerberos token and is able to access the website.
  • Click Next and Finish

The added task will automatically run on the next scheduled date.

Using wget

If you are using Kerberos as a method for SSO, please go with the PowerShell solution described above.
  • Download the wget setup package from http://gnuwin32.sourceforge.net/packages/wget.htm or use this link link to sourceforge. Please note that the ZIP file does not include the required libraries.

  • Let the setup programm install wget into e.g. c:/wget

  • The Program/script input field must point to the previously installed wget.exe (c:/wget/bin/wget.exe)

    • The input field Add arguments (optional) must be populated with the wget parameters provided in NADI on the Sync to WordPress respective Sync to AD page, like

    --post-data 'next_ad_int-task=sync-to-ad&auth-code=MFuyIpDJEEOUhw8cLsB0' http://localhost/wp-admin/admin.php

  • Click Next and Finish

The added task will automatically run on the next scheduled date.

Crontab

A scheduling service (a.k.a. task scheduler) is an important constituent of a system for the automatic execution of recurring tasks. Z-Cron is a scheduler which you can use to run jobs/tasks on your PC time-controlled with a schedule. Z-Cron is a central coordination point for the scheduling and automation of software. In addition to the time-controlled start of applications, the program contains numerous tools which help to ease the automatical and scheduled system administration.


With Z-Cron scheduler you can start and/or quit programs (*.exe, *.com, *.bat) under Windows time-triggered similar to the Unix Cron. A scheduler is one of the most powerful services on a computer system. You can use it to launch all kinds of programs at defined times automatically, for example for backup jobs with Z-DATdump during the night, and no user has to be logged on for that.

Z-Cron can be configured to automatically run at Windows startup. Status information can be sent using Microsoft messenger service or e-mail (per SMTP).
Z-Cron scheduler can also be installed as a system service on Windows 10, 8, 7, Vista, XP or Windows Server 2016, 2012(R2), SBS 2011, 2008(R2) & 2003.


Scheduler software

INFO

T-racks soft clipper. Get more information about scheduling software!

Download

Download freeware
Z-Cron scheduling software!