Viewing 3 replies - 1 through 3 (of 3 total)
  • The plugin makes POST requests to the following 2 urls in order to setup the static site.. If you want to set this up with wp-cron, you MAY be able to use wp_remote_post() and mimic the requests in your own code.

    /wp-admin/admin-ajax.php?action=generate_static_archive&perform=start

    /wp-admin/admin-ajax.php?action=generate_static_archive&perform=continue

    Basically, you run the first line, which starts the process.. This sends back a response (JSON) which contains a ‘done’ property. Make a request to the second example (continue) while ‘done’ is false.. Each request to continue returns back the same JSON you can use to check for ‘done’.

    If for any reason you need to cancel, you can make this request:

    /wp-admin/admin-ajax.php?action=generate_static_archive&perform=cancel

    Hi semyan,

    You can try crgeary’s method, but Simply Static isn’t set up terribly well to run with wp-cron currently. It’s definitely something I plan to address in the future though.

    Best,
    Scott

    Have you been able to make it work?
    Calling wp_remote_post() on that URL returns -1 to me.
    Any advice?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Possible to run on a schedule?’ is closed to new replies.