Difference between a scheduled task and basic notification

Hello All,

Could you all please provide the difference between a scheduled task and basic notification?

We have a requirement to fetch database records from source at regular interval and process it to send to target.

Below is our understanding:

  1. Scheduler service will execute even if the database has no change. Notification will run the service only when there is an action to the table (I/U/D)

  2. Notification connection maintains a single session with the database. Scheduled task will re-establish the connectivity every time the scheduler service runs.

  3. Scheduled task does not support exactly once processing. Notification does.

  4. Notification is more secure as we do not perform any DML on the base table. we only do a SELECT on the based table based on the details provided in the buffer table.

  5. Notifications are built to handle high volume of data as it utilizes UM.

Kindly provide more pros and cons between the 2 approaches.

Thanks & Regards,
Khushaboo Shandilya

Basic DB Notification are for processing real time high volume data, with exactly once processing.
On notification level it facilitates you to maintain Trigger,Buffer Table and avoid the risk of deletion when notification is disabled.

Schedulers are used to process/fetch the data at certain intervals regardless of changes from past fetch, normally preferred for batch processing to avoid network crowd.

As per my exposure

  1. real time events on DB is preferred to handle through basic notification, when the handling data is also huge but needs to avoid delicacy.
  2. Schedulers are written when you have a requirement to swipe the data at regular intervals.

Again your Implementation would depends on the exact requirement and what exactly you want achieve.