It is not uncommon for a database to have batch processes you perform after hours. You will typically want to back up your database after hours also.
These two activities conflict with each other: for instance, if the server tries to do the backup during the batch process.
But you may not be able to predict how long the batch process will take to complete. So what time do you set for your backup?
It is very easy to set your backup to start immediately after your batch process. Turn off your timed backup, and execute your backup with code instead. Ensure that your batch process doesn't leave any transactions open (because these will block the backup), then add the following lines of code immediately after your batch process:
if (BK Start copy=0)
Until ( BK Get state # 4)
BK END BACKUP
`add some error reporting code here
Notice that you have to repeatedly call the BK Get state command to get the backup to proceed. Refer to the 4D Backup Reference manual for more information.