You can set a number of properties in alfresco-global.properties:
# Decide if content should be removed from the system immediately after being orphaned.
# Do not change this unless you have examined the impact it has on your backup procedures.
# The number of days to keep orphaned content in the content stores.
# This has no effect on the 'deleted' content stores, which are not automatically emptied.
# The action to take when a store or stores fails to delete orphaned content
# IGNORE: Just log a warning. The binary remains and the record is expunged
# KEEP_URL: Log a warning and create a URL entry with orphan time 0. It won't be processed or removed.
# The CRON expression to trigger the deletion of resources associated with orphaned content.
system.content.orphanCleanup.cronExpression=0 0 4 * * ?
In addition, you can understand all the Jobs involved in file deletion in https://github.com/keensoft/alfresco-deleted-content-store-cleaner
Hyland Developer Evangelist