WordPress.org

Support

Support » Plugins and Hacks » Cron job for "full calculations" ?

Cron job for "full calculations" ?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author AntoineH
    Participant

    @antoineh

    I don’t think this is possible with the current version. The calculation runs entirely in the WordPress context with AJAX calls and calling it directly (e.g. via wget) won’t work. But, to be honest, I am not an expert on the matter.

    WP also has its own cron system. I’ll have a look at that, maybe I can use that and add this as an extra feature to the plugin.

    sillery4ever
    Member

    @sillery4ever

    Is it possible for you to writ phpscript that call the “full calculations” task ? in order to place this phpfile in a Crop job ?

    Plugin Author AntoineH
    Participant

    @antoineh

    Well, I guess this should be possible, but it’s not something that is high on my to-do list.

    sillery4ever
    Member

    @sillery4ever

    ok thks

    sillery4ever
    Member

    @sillery4ever

    Now i have 1000+ user…. smart calculations have a duration of 30min.

    I am looking for an idea to run a cron job each night.

    My serveur can execute some php file automatically. Could you tell me wich php file can i affect to the cron job to run automatically the smart calculation ?

    TY

    Plugin Author AntoineH
    Participant

    @antoineh

    As said before, I don’t think it will work with the current version. But if you want to try something, here’s some information about the inner working of the calculation.

    The file called is /admin/class-football-pool-admin-score-calculation.php. But you’ll have to pass some variables to this file and wait for the script to finish before the next step can start.
    The /assets/admin/admin.js file contains the javascript code that handles the calls to this script (in multiple steps).

    The score calculation file can run in both AJAX mode and as a script that accepts the variables in the querystring (set constant FOOTBALLPOOL_RANKING_CALCULATION_NOAJAX to true in your wp-config.php).

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Cron job for "full calculations" ?’ is closed to new replies.