• Hello Fabrik Community

    Fabrik is now in the hands of the development team that brought you Fabrik for Joomla 4. We have recently transitioned the Fabrik site over to a new server and are busy trying to clean it up. We have upgraded the site to Joomla 4 and are running the latest version of Fabrik 4. We have also upgraded the Xenforo forum software to the latest version. Many of the widgets you might have been used to on the forum are no longer operational, many abandoned by the developers. We hope to bring back some of the important ones as we have time.

    Exciting times to be sure.

    The Fabrik 4.0 Official release is now available. In addition, the Fabrik codebase is now available in a public repository. See the notices about these in the announcements section

    We wish to shout out a very big Thank You to all of you who have made donations. They have really helped. But we can always use more...wink..wink..

    Also a big Thank You to those of you who have been assisting others in the forum. This takes a very big burden off of us as we work on bugs, the website and the future of Fabrik.

Scheduled tasks

  • Views Views: 34,766
  • Last updated Last updated:
  • The schedule section allows you to define tasks that are run repeatedly at a given time and interval.

    For the schedule section to work you MUST have installed and published the Fabrik schedule system plug-in.

    The Fabrik Schedule System plugin will run on every front end page load and launches individual crons based on their settings. This is done as one of the very last things that Joomla does, once it has output the page (so you won't notice it when loading a page as a user). It then loads the metadata (settings from #__fabrik_crons) for all your cron plugins, which includes a "last_run", as well as the frequency settings you set for each one. Then it simply runs any which are due (or overdue).

    View Scheduled Tasks​


    Schedule 1082.png



    Each scheduled task can be selected with the check box to the left of its name. Once selected it can be altered by clicking on the buttons in the top right hand corner:
    • Run - force the scheduled task to run straight away.
    • New - allows you to create a new scheduled task.
    • Edit - allows you to edit the scheduled task, note that you can also edit the scheduled task by clicking on its name.
    • Publish - sets the state of the scheduled task to published.
    • Unpublish - sets the state of the scheduled task to unpublished.
    • Check In - checks in the scheduled task.
    • Trash - trashes the scheduled task.
    • Options - links to the general Fabrik Options.
    • Help - links to the related Fabrik wiki article.
    For each schedule in the list you also have the field:

    Published - toggles the form's published state.

    Add / Edit a Scheduled Task​


    cron-details.png

    Details​

    • ID - the scheduled tasks id number as recorded in the database.
    • Label - a descriptive name for the scheduled task.
    • Last run - States the last time that the plug-in was run - you can set this to a future date to disable the scheduled task until a given date, at which point it will start to run
    • Status - sets whether the scheduled task is published.
    • Connection - Fabrik connection containing the list whose data you wish to use in the scheduled task
    • List - A Fabrik list which is pre-loaded when the scheduled task is run. Selecting a list is optional, not selecting one just means $data will be empty instead of being populated with list data. Note Fabrik will render the element data, as if it was going to be output for display. And that takes time - orders of magnitude more than simply selecting raw data from a database. Trying to render thousands of rows can take a lot of time and may well run you out of script execution time.
    • Plugin - the plug-in that is run on the tables' data.

    Run​

    • Every - Enter an integer. This will combine with the 'unit' drop down to indicate when the scheduled task will run - e.g. 'Every 1 day', 'Every 5 hours'.
    • Unit - Select a time unit that will combine with the 'Every' field to indicate when the scheduled task will run - e.g. 'Every 1 day', 'Every 5 hours'.

    Log​

    upload_2021-11-26_19-31-20.png

    • Log events -If set to yes then each time the scheduled task is run the results are logged in the database table #__fabrik_logs.
    • Email to - comma separated list of email addresses to send the scheduled task log to.
    • Require query string - If set to yes then the plugin will only run if the page's URL contains the querystring 'fabrik_cron=1' (unless modified with the Query Secret option). Useful to stop processor intensive queries running when a browser requests a page, whilst still allowing server cron jobs to run using something like wget with &fabrik_cron=1 applied to the url from a standard UNIX cron job. If using this option, you should set your run frequency to something very low, as you will not be able to run it even with the query string addition more often than the freuency interval.
      The simplest way to call this is: 'wget https://yoursite.com/index.php?fabrik_cron=1' or, for systems without wget, 'curl -s https://yoursite.com/index.php?fabrik_cron=1' or, for webcron like easycron.com with URL: 'https://yoursite.com/index.php?fabrik_cron=1' .
    • Query Secret - If 'Require querystring' is enabled, you can optionally specify key word to trigger this plugin, by using 'fabrik_cron=yoursecret' on the query string instead of 'fabrik_cron=1'.
    • Use Run Gating - If set to yes, Fabrik will temporarily unpublish this plugin when it is running, to prevent multiple copies being run at the same time. This is useful if you have a script which can potentially take longer to execute than the run interval. If you use this option, you should periodically check to make sure you pligin has not become stuck as unpublished, as if your script causes certain error conditions, we may not be able to re-publish it.
    • Reschedule Manual - If set to Yes, will update the lastrun date and reschedule when manually running the plugin on the backend, as well as when running through via the Cron system plugin. If set to No, will only reschedule when running via the System plugin.
Back
Top