JobSandbox works like a time-based scheduler. It is used to schedule Tasks periodically at fixed times, dates or intervals. Within SCIPIO the scheduler is based on Quartz.  JobSandbox makes use of the service engine for all operations. A similar concept on the entity level can be achieved by the use of EntitySync. The concept itself differs slightly, however, as the use of EntitySync is mostly designed around the scheduled synchronisation of databases (as in POS systems) and not for maintenance in general.


<?xml version="1.0" encoding="UTF-8"?>
    <JobSandbox jobId="8200" jobName="Clear EntitySyncRemove Info" runTime="2000-01-01 00:00:00.000" serviceName="cleanSyncRemoveInfo" poolId="pool" runAsUser="system" tempExprId="MIDNIGHT_DAILY" maxRecurrenceCount="-1"/>

    <!-- EntitySync example, with Job demo -->
    <!-- Increased default split time to 10 minutes (600000 seconds) instead of 10 seconds, for demonstrations and normal
        testing this should perform MUCH better; for busy sites this should be reduced closer to something like 10 seconds;
        the point is to find a balance between the time required for the queries and the amount of data sent over the wire per call -->
    <EntitySync entitySyncId="1500" runStatusId="ESR_NOT_STARTED" syncSplitMillis="600000" targetServiceName="remoteStoreEntitySyncDataRmi" keepRemoveInfoHours="24" forPushOnly="Y"/>
    <EntitySyncInclude entitySyncId="1500" entityOrPackage="ServerHit" applEnumId="ESIA_EXCLUDE"/>
    <EntitySyncInclude entitySyncId="1500" entityOrPackage="ServerHitBin" applEnumId="ESIA_EXCLUDE"/>
    <EntitySyncInclude entitySyncId="1500" entityOrPackage="org.ofbiz.service" applEnumId="ESIA_EXCLUDE"/>
    <EntitySyncInclude entitySyncId="1500" entityOrPackage="org.ofbiz.entity" applEnumId="ESIA_EXCLUDE"/>
    <EntitySyncInclude entitySyncId="1500" entityOrPackage="org.ofbiz." applEnumId="ESIA_INCLUDE"/>
    <!-- Complexe recurrence definition -->
        <RecurrenceRule recurrenceRuleId="1500" untilDateTime="" frequency="MINUTELY" intervalNumber="2" countNumber="-1"/>
        <RecurrenceInfo recurrenceInfoId="1500" startDateTime="2000-01-01 00:00:00.000" recurrenceRuleId="1500" recurrenceCount="0"/>
        <RuntimeData runtimeDataId="1500">
            <runtimeInfo><![CDATA[<?xml version="1.0" encoding="UTF-8"?>
                        <std-String value="entitySyncId"/>
                        <std-String value="1500"/>
        <JobSandbox jobName="Run Demo EntitySync" runtimeDataId="1500" runTime="2000-01-01 00:00:00.000" serviceName="runEntitySync" poolId="pool" runAsUser="system" recurrenceInfoId="1500"/>