When scheduling a scan, including a scan which includes an automatic deployment, the details are notated (including the user to run as, the machine group to target, the scan and deployment templates to be used, etc.). When the scheduled time and date to run occurs, the service accounts will create and execute the task as the 'User to run as'.
Important points to note when scheduling a scan task are as follows:
1) The 'User to run as' credentials will need to have the necessary permissions to perform the task. If a machine group requires additional permissions be specified, those permissions will need to have been created and specified under the credentials of the 'User to run as'.
2) The 'User to run as' credentials will automatically be set to the specified 'Default' credential (if this is set). If there no 'Default' credential set, you will be prompted to specify the 'User to run as' credential when scheduling the task.
3) The console machine will need to be running, and the console and scheduler services will need to have started in order for the scheduled task to occur.
The 1385 error is most likely indicating that the 'User to run as' does not have the necessary credentials, particular in terms of permissions. Verify that the 'User to run as' credentials are being granted (and not denied) the following permissions (e.g. under the target machine's local security policy):
Backup Files and Directories
Restore Files and Directories
Take Ownership of Files or Other Objects
Manage Auditing and Security Log
Log on as a Batch Job