With the Jobs features, you can:

  • Create Jobs to automatically import and export data, which you schedule to run on a regular basis
  • View all scheduled Jobs
  • Modify the Jobs.

To access the Jobs features, select Tasks > Jobs, then use the Administer All Jobs page. You can access Jobs features for all Studies and Sites from this page, no matter what the current Study or Site is:

Administer All Jobs

6.5.1 Scheduled Import Jobs

You can schedule a Job to regularly import data that is in a properly-formatted XML file. For background information about importing data into OpenClinica, see Import Data.

6.5.1.1 Create an Import Job

Before you can create an import Job, the file(s) to be imported must exist at a location specified in your OpenClinica system configuration. For information about creating an import file, see Data File for Import. For more about the location of the import files, see filePath in the datainfo.properties file in Configuring the OpenClinica Application.

To create an import Job:

  1. Select Tasks > Jobs.
    The Administer All Jobs page opens.
  2. Click View All Import Data Jobs.
    The View Scheduled Import Data Jobs page opens.
  3. Click Create a New Import Data Job.
    The Create Scheduled Job: Import Data page opens.

    Create Scheduled Import Data Job

  4. Complete at least the required fields. Refer to the following information as needed:
    • Import Job Name: The name must be unique among all Job names on your OpenClincia system.
    • Import Job Study: The Study or Site where the data will be imported to.
    • The default filepath to import from: The value reported here is the filePath specified in the datainfo.properties file; see Configuring the OpenClinica Application for details. If your files are being imported from multiple locations, put all of the files into the filePath location.
    • You can create a new directory here …: If you want to put the files to be imported for this Job in a subdirectory of the location specified in filePath, enter the name of the subdirectory here. The subdirectory must exist.
    • Frequency: When you complete creating the Job, it runs for the first time. After that, it runs regularly at the interval you specify here. For example, if the current time when you save this page is 08:10, and you specify a frequency of 12 hours, the Job will run at 08:10 today, and again today at 20:10, then again at 08:10 and 20:10 tomorrow and each day after that.
    • Contact Email: Each time the Job completes running, the OpenClinica system sends an email notification to the addresses you specify here, stating that the imported data Job has completed. Separate multiple email addresses with a comma, for example: dmanagone@institution.org, sdirk@institution.org.
  5. Click Save.
    The import Job runs and an email including a link to OpenClinica is sent to all email addresses provided. OpenClinica moves the files from the filePath location to another folder so that the same files are not imported the next time the Job runs. The View Scheduled Import Data Jobs page opens. It now includes the scheduled import Job you just created, showing that the Previous Fire Time is the current time and the Next Fire Time is based on the interval you specified for Frequency.

6.5.1.2 View Scheduled Import Jobs

To view all scheduled import data Jobs:

  1. Select Tasks > Jobs.
    The Administer All Jobs page opens.
  2. Click View All Import Data Jobs.
    The View Scheduled Import Data Jobs page opens, listing all scheduled import Jobs and information about them such as the Previous Fire Time (last date and time the Job executed), and Next Fire Time (the next date and time the Job is scheduled to execute). The time used is server time, which is reported on the page.

    View Scheduled Import Jobs

  3. View summary information about the Jobs in the table. You can click any of the column header links to sort the Jobs by that column. Use the Find field to find all Jobs whose Name, Description, Study, or Times includes the text you specify.
  4. To see details about a Job, click the View icon for it.
    The View Job page opens for that Job.

    View Import Job

 

6.5.1.3 Modify Scheduled Import Jobs

You can edit the parameters of an import Job, remove or restore an import Job, or delete an import Job.

Edit an Import Job

  1. Select Tasks > Jobs.
    The Administer All Jobs page opens.
  2. Click View All Import Data Jobs.
    The View Scheduled Import Data Jobs page opens, listing all scheduled import Jobs.
  3. For the Job you want to edit, click the Edit icon.
    The Update Scheduled Job: Import Data page opens.

    Update Scheduled Job: Import Data

  4. Make changes to the values, then click Save.
    The Scheduled Import Data Jobs page opens, reflecting the changes you made to the Job.

Remove an Import Job

Remove a scheduled import Job to stop it from running at the specified frequency. You can later restore the Job. To remove an import Job:

  1. Select Tasks > Jobs.
    The Administer All Jobs page opens.
  2. Click View All Import Data Jobs.
    The View Scheduled Import Data Jobs page opens, listing all scheduled import Jobs.
  3. For the Job you want to remove, click the Remove icon Remove Icon.
  4. Click OK in the confirmation dialog box.
    The View Scheduled Import Data Jobs page opens. The Job you removed is still listed, but with no value for Next Fire Time.

Restore an Import Job

When you want to resume running a Job according to the specified frequency after it has been removed, restore the Job as follows:

  1. Select Tasks > Jobs.
    The Administer All Jobs page opens.
  2. Click View All Import Data Jobs.
    The View Scheduled Import Data Jobs page opens, listing all scheduled import Jobs.
  3. For the Job you want to restore, click the Restore icon Restore Icon.
  4. Click OK in the confirmation dialog box.
    The View Scheduled Import Data Jobs page opens. The Job you restored is listed, and the Next Fire Time now shows when the Job will next run.

Delete an Import Job

Delete an import Job when you no longer want the Job to run. You cannot restore a deleted Job. To delete a scheduled import Job:

  1. Select Tasks > Jobs.
    The Administer All Jobs page opens.
  2. Click View All Import Data Jobs.
    The View Scheduled Import Data Jobs page opens, listing all scheduled import Jobs.
  3. For the Job you no longer want, click the Delete icon Delete Icon.
  4. Click OK in the confirmation dialog box.
    The View Scheduled Import Data Jobs page opens. The Job you deleted is no longer listed. If you need the Job again, you can re-create it.

6.5.2 Scheduled Export Jobs

You can schedule a Job to regularly export data for an existing dataset definition. For background information about exporting data from OpenClinica, see Extract Data.

6.5.2.1 Create an Export Job

Before you can create an export Job, the dataset definition must exist. For information, see Define Dataset.

To create an export Job:

  1. Select Tasks > Jobs.
    The Administer All Jobs page opens.
  2. Click View All Export Data Jobs.
    The Scheduled Export Data Jobs page opens.
  3. Click Create a New Export Data Job.
    The Create Scheduled Job: Export Dataset page opens.

    Create a Scheduled Export Job

  4. Complete at least the required fields. Refer to the following information as needed:
    • The list of datasets to export includes dataset definitions that already exist for all Studies.
    • Set the time using server time, which is shown just below the title and uses a 24-hour format. The Job will run for the first time on the date and at the time you specify in Start Date/Time. The Job will run again at the same time on a date that is based on the interval you specify in the Period to Run.
    • Each time the Job completes running, the OpenClinica system sends an email notification to the addresses you specify here that the exported dataset Job has completed. Separate multiple email addresses with a comma, for example: dmanagone@institution.org, sdirk@institution.org.
    • For information about file formats, see Formats for Dataset Files.
  5. Click Confirm and Save.
    The Scheduled Export Data Jobs page opens. It now includes the scheduled export Job you just created.

6.5.2.2 View Scheduled Export Jobs

To view all scheduled export Jobs:

  1. Select Tasks > Jobs.
    The Administer All Jobs page opens.
  2. Click View All Export Data Jobs.
    The Scheduled Export Data Jobs page opens, listing all scheduled export Jobs and information about them such as the Previous Fire Time (last date and time the Job executed), and Next Fire Time (the next date and time the Job is scheduled to execute). The time used is server time, which is reported on the page.

    Scheduled Export Jobs

  3. View information about the Jobs. You can click any of the column header links to sort the Jobs by that column. Use the Find field to find all Jobs whose Name, Description, Period, or Dataset includes the text you specify.
  4. Click the View icon for a Job to see details about it.
    The View Job page opens for that Job.

    View Export Job

To view the dataset file created by the export Job, see Archive of Exported Dataset Files.

6.5.2.3 Modify Scheduled Export Jobs

You can edit the parameters of an export Job, remove or restore an export Job, or delete an export Job.

Edit an Export Job

  1. Select Tasks > Jobs.
    The Administer All Jobs page opens.
  2. Click View All Export Data Jobs.
    The Scheduled Export Data Jobs page opens, listing all scheduled export Jobs.
  3. For the Job you want to edit, click the Edit icon.
    The Update Scheduled Job: Export Dataset page opens.

    Edit Export Job

  4. Make changes to the values, then click Confirm and Save.
    The Scheduled Export Data Jobs page opens, reflecting the changes you made to the Job.

Remove an Export Job

If you want to stop a scheduled export Job from running at the specified frequency, remove the Job. You can later restore it. To remove an export Job:

  1. Select Tasks > Jobs.
    The Administer All Jobs page opens.
  2. Click View All Export Data Jobs.
    The Scheduled Export Data Jobs page opens, listing all scheduled export Jobs.
  3. For the Job you want to remove, click the Remove icon Remove Icon.
  4. Click OK in the confirmation dialog box.
    The Scheduled Export Data Jobs page opens. The Job you removed is listed, with no value for Next Fire Time. The datasets created by the Job are not removed.

Restore an Export Job

Restore an export Job that was previously removed when you want to resume running the Job according to the specified frequency. To restore an export Job:

  1. Select Tasks > Jobs.
    The Administer All Jobs page opens.
  2. Click View All Export Data Jobs.
    The Scheduled Export Data Jobs page opens, listing all scheduled export Jobs.
  3. For the Job you want to restore, click the Restore icon Restore Icon.
  4. Click OK in the confirmation dialog box.
    The Scheduled Export Data Jobs page opens. The Job you restored is listed, and the Next Fire Time now shows when the Job will next run.

Delete an Export Job

Delete an export Job when you no longer want the Job run. You cannot restore a deleted Job. The data extract file  created the last time the Job ran is not deleted. To delete a scheduled export Job:

  1. Select Tasks > Jobs.
    The Administer All Jobs page opens.
  2. Click View All Export Data Jobs.
    The Scheduled Export Data Jobs page opens, listing all scheduled export Jobs.
  3. For the Job you no longer want, click the Delete icon Delete Icon.
  4. Click OK in the confirmation dialog box.
    The Scheduled Export Data Jobs page opens. The Job you deleted is no longer listed. The datasets created by the Job are not deleted.
    If you need the Job again, you can re-create it.

6.5.3 View or Cancel Data Exports

All exports that are scheduled to run or are currently running are said to be in the queue. You can view the queue and cancel any of the exports in it. The queue includes scheduled export Jobs, as well as exports you manually executed using the Extract Data module: see Generate and Download Dataset for more information.

  1. Select Tasks > Jobs.
    The Administer All Jobs page opens.
  2. Click View Currently Executing Data Export Jobs.
    The Currently Executing Data Export Jobs page opens, listing all scheduled export Jobs and any extracts you manually-executed that have not yet completed running.

    Current Export Jobs

  3. To help you find specific exports, or organize the exports shown, you can sort the queue by clicking any of the column headers. For example, click Fire Time to show queue entries in the order they will be executed. You can also filter the entries by entering text in any of the fields beneath the column headers and clicking Apply Filter.
  4. If you want to stop the entry that is currently running, or remove any entry from the queue, click Cancel Job, then click OK in the confirmation dialog box.
    • If the export you canceled is one that you manually executed, it no longer appears in the queue.
    • If the export you canceled is a scheduled Job, it remains in the queue, but the value for next Fire Time advances: it cancels only the next scheduled export for that Job. If you want to stop a scheduled Job from running more than once, see Modify Scheduled Export Jobs – Remove Job.
    • If the next export in the queue was waiting for the export you just canceled, that next scheduled export will start running.