Feature: Briefcase Automation

For Outreachy Internship, I have been working on the new Briefcase automation tab. The initial goal was to have briefcase automate tasks such as Pull, Push and Export. It's going to be a new tab which will be used to schedule tasks. For windows, it will use Windows Scheduler if on Linux/Mac then it'll use Cron for the scheduling.

What has been done

  • Added a new Tab with a table of forms with check boxes to specify which operations(Pull, Push and Export) we wish to automate
  • Generate a script based on the UI configuration and selection of forms
  • If on windows, a batch file is generated if on linux/mac a shell script is
  • Script can either use the running briefcase jar by default with an option to pass in the jar as an argument to the script

What still needs to be done

Add shebang for Linux/Mac shell script outputs
Interact directly with schedulers rather than generating a script and having the user add it manually to cron or windows scheduler (still some concerns with how this will be done)
Provide means to define custom export, pull and push confs per form

How to use the new feature

The automation only works with forms that are already in briefcase storage directory. This means you cannot use the automation feature to pull new forms but just update already pulled forms. So if you don't see any form in the automation tab, it just means you've not pulled any forms yet. First move to the Pull tab and pull some forms.

  1. Specify where you want the generated script to be stored.

  1. Configure pull, push and export configurations. At the moment all forms will share the same configuration.

  1. Select which forms need to appear in script and also specify which operations should be performed on each form. Only checked operations on a form will be specified in script.

  1. Generate script by clicking the generate script button.

You'll find the generated script in the in the location specified above. It should look something like this on Linux/Mac


A number of reasons contributed to the fact that the scheduler has not been integrated yet. One of which is the fact that we don't yet know how to handle the fact that, most of the servers that the scheduling will be done on are headless servers which means they'll not have access to the automation UI to do the scheduling. That's why we went with just script for now so that the script can be generated on a machine and then used for scheduling on multiple servers. The implementation of this feature is open for discussion.

We also need to decided what to do when the user needs to remove the scheduled script or change it's scheduling settings.

cc @ggalmazor @LN @yanokwa