---
title: "Scheduling the Inbound Data Sync"
canonical: "https://help.fieldbuddy.com/space/FBDOCS/2078310787/Scheduling%20the%20Inbound%20Data%20Sync"
format: markdown
---
FlexConnect package gives the user the option to launch the scheduled job for automated inbound data sync based.

The frequency expression can be set according to the rules showed on the following page: [https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_scheduler.htm](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_scheduler.htm) .

Examples are shown on the right side of this page.

> ℹ️ Salesforce does not allow to schedule anything less than 1 hour. So setting a job in 15 mins using System.schedule is not possible.
> ℹ️ 
> ℹ️ (0 15 * * * ?) : This means the job will execute in every hour on XX:15 mins. Like 10.15, 11.15, 12.15 etc..
> ℹ️ 
> ℹ️ Normally (0 0,15,30,45 * * * ?) should allow to schedule the job in every 15 mins. But salesforce does not allow this. [https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_scheduler.htm](https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_scheduler.htm)


#### Cron Examples

- Every hour: 0 1 * * * ?
- Every day at 23:00: 0 0 23 ? * *
- Every 2 hours: 0 0 */2 * * ?
- Every day at specific hours: 0 0 7,12,18,22 ? * *

#### Simple Schedule Steps

Given steps are suitable for you in case if you have one single Service Provider, and in you want to schedule it according to cron job. To more sophisticated case, check the following paragraph

1. Go to the Service Provider Tab
2. Pick corresponding Service Provider
3. Update Cron Expression field if needed
4. Click **Schedule Sync** button
  
5. In case the syntax of the custom setting is incorrect the page will show an error.

At the time job is scheduled the inbound data sync should start. In case logging is enabled, the inbound Audit Trail record(s) are be created and your data is synchronised.

> ℹ️ Since version 1.18.0, it is possible to schedule sync for multiple service providers without running apex snippet!

#### Advanced Schedule

Sometimes you may need to schedule sync to be more or less often.

Basically, more advanced schedule is done by following code:

```
System.schedule('Some job name', 'some cron interval', new FBCONNECT.cls_FBInboundProcessSchedule('some provider id'));
```

<span style="color: #000000"> </span>