Enable scheduled exports

Issue #875 new
Ed McDonagh created an issue

A user has enquired how to schedule exports, for example with a cronjob, and export to a standard folder.

Comments (1)

  1. Ed McDonagh reporter

    There isn’t a function for this currently - it probably should be implemented as part of adding a REST framework interface.

    In the meantime, the export can be triggered with a scripted CURL request - see https://stackoverflow.com/a/24376188/2602671 for code that enables the authentication to work. Then it is a case of crafting the URL request to trigger the export to start.

    For example: http://openremserver/openrem/export/ctcsv1/0/0/?study_date__gt=2020-12-01&generalequipmentmoduleattr__unique_equipment_name__display_name=My+CT+scanner

    You can create the right URL by copying the link to exports in the web interface after filtering as required, then removing any parts of the URL that you haven’t tailored.

    I don’t have a proposal right now for how you monitor the progress of the export, or knowing what the URL is to download the file if you can work out when it is ready.

  2. Log in to comment