Automatic downloads
The Deadline CLI provides a command to download the output of all tasks in a queue that completed since the last time the same command ran. You can configure this as a cron job or scheduled task to run repeatedly. This configuration sets up automatic downloading of output on a continuous basis.
Before setting up automatic downloads, follow the steps in Storage profiles for job attachments to configure all paths of asset data for upload and download. If a job uses an output path that is not in its storage profile, then the automatic download skips downloading that output and prints warning messages to summarize the files it did not download. Similarly, if a job is submitted without a storage profile, the automatic download skips that job and prints a warning message. By default, Deadline Cloud submitters display warning messages for paths that are outside of storage profiles to help ensure correct configuration.
Configuring AWS credentials
Automatic downloads use the Deadline CLI to continuously download job outputs. To authenticate these downloads, you need long-term IAM credentials. Deadline Cloud monitor credentials expire, so you can't use them for this purpose.
Follow the steps below to set up long-term credentials.
Important
Heed the following warnings:
-
Do NOT use your account's root credentials to access AWS resources. These credentials provide unrestricted account access and are difficult to revoke.
-
Do NOT put literal access keys or credential information in your application files. If you do, you create a risk of accidentally exposing your credentials if, for example, you upload the project to a public repository.
-
Do NOT include files that contain credentials in your project area.
-
Secure your access keys. Do not provide your access keys to unauthorized parties, even to help find your account identifiers. By doing this, you might give someone permanent access to your account.
-
Be aware that any credentials stored in the shared AWS credentials file are stored in plain text.
For more details, see Best practices for managing AWS access keys in the AWS General Reference.
Create an IAM user
Open the IAM console at https://console.aws.amazon.com/iam/
. -
In the navigation pane, select Users and then select Create user.
-
Name the user
deadline-output-downloader. Clear the checkbox for Provide user access to the AWS Management Console, then choose Next. -
Choose Attach policies directly.
-
Choose Create policy to create a custom policy with minimum required permissions.
-
In the JSON editor, specify the following permissions:
-
Name the policy
DeadlineCloudOutputDownloadPolicyand choose Create policy. -
Return to the user creation page, refresh the policy list, and select the DeadlineCloudOutputDownloadPolicy you just created, then choose Next.
-
Review the user details and then choose Create user.
Create an access key
-
From the user details page, select the Security credentials tab. In the Access keys section, choose Create access key.
-
Indicate that you want to use the key for Other, then choose Next, then choose Create access key.
-
On the Retrieve access keys page, choose Show to reveal the value of your user's secret access key. You can copy the credentials or download a .csv file.
Store the user access keys
-
Store the user access keys in the AWS credentials file on your system:
-
On Linux, the file is located at
~/.aws/credentials -
On Windows, the file is located at
%USERPROFILE%\.aws\credentials
Replace the following keys:
[deadline-downloader] aws_access_key_id=ACCESS_KEY_IDaws_secret_access_key=SECRET_ACCESS_KEYregion=YOUR_AWS_REGION -
Important
When you no longer need this IAM user, we recommend that you remove it to align with the AWS security best practice. We recommend that you require your human users to use temporary credentials through AWS IAM Identity Center when accessing AWS.
Prerequisites
Complete the following steps before creating a cron job or scheduled task for automatic download.
-
If you haven't already, install Python
from the Python website. -
Install the Deadline CLI by running:
python -m pip install deadline -
Confirm the version of the Deadline CLI is 0.52.1 or newer with the following command.
$ deadline --version deadline, version 0.52.1To see download status in the Deadline Cloud monitor, use version 0.60.4 or newer. That version started recording the download status that the monitor reads. For more information, see View output download status in Deadline Cloud.
Test the output download command
To verify the command works in your environment
-
Get the path to Deadline
-
Run the sync-output command to bootstrap.
/path/to/deadline queue sync-output \ --profile deadline-downloader \ --farm-id YOUR_FARM_ID \ --queue-id YOUR_QUEUE_ID \ --storage-profile-id YOUR_PROFILE_ID \ --checkpoint-dir /path/to/checkpoint/directory \ -
You only need to do this step if your downloading machine is the same as submitting machine. Replace
--storage-profile-id YOUR_PROFILE_ID \above with--ignore-storage-profiles. -
Submit a test job.
-
Download the .zip file from GitHub.
-
Open the deadline-cloud-samples repository
on the GitHub website. -
Choose Code and then, from the dropdown menu, select Download ZIP.
-
Unzip the downloaded archive to a local directory.
-
-
Run
cd /path/to/unzipped/deadline-cloud-samples-mainline/job_bundles/job_attachments_devguide_output -
Run
deadline bundle submit .-
If you don't have the default deadline config setup, you might need to supply the following in the command line.
--farm-idYOUR-FARM-ID--queue-idYOUR-QUEUE-ID
-
-
Wait for the job to complete before going to the next step.
-
-
Run the sync-output command again.
/path/to/deadline queue sync-output \ --profile deadline-downloader \ --farm-id YOUR_FARM_ID \ --queue-id YOUR_QUEUE_ID \ --storage-profile-id YOUR_PROFILE_ID \ --checkpoint-dir /path/to/checkpoint/directory -
Verify the following:
-
Your test job's outputs appear in the destination directory.
-
A checkpoint file is created in your specified checkpoint directory.
-
Set up scheduled downloads
Select the tab for your operating system to learn how to configure automatic downloads for every 5 minutes.
Verify the setup
To verify the automatic downloads setup was successful, complete the following steps.
-
Submit a new test job.
-
Wait for one scheduler interval to complete, which in this case is 5 minutes.
-
Verify that new outputs are downloaded automatically.
If the outputs do not download, check the Troubleshooting section for the process logs.
Troubleshooting automatic downloads
If you encounter issues with the automatic downloads, check the following:
Download error codes
When a download fails, the Download status column in the Deadline Cloud monitor
names the reason, and the deadline queue sync-output command records one of the
following error codes. Most of these errors are resolved on the machine that runs the download
command, which is often a different machine from the one you view the monitor on.
PERMISSION_DENIED(Permission denied)-
The downloader isn't allowed to write to the output location, or its AWS credentials were denied access. Grant the user that runs the download command write access to the output location, confirm the command's AWS profile has access to the queue, and run the command again.
DISK_FULL(Disk full)-
The machine running the download ran out of disk space. Free up space on the drive that holds the output location, then run the command again.
PATH_NOT_FOUND(Path not found)-
The output destination doesn't exist or isn't mounted on the machine running the download. Create the directory or mount the shared drive, then run the command again.
NETWORK_ERROR(Network error)-
A network interruption stopped the transfer. Network errors are usually transient. Run the command again, and check the machine's connectivity if the error repeats.
UNKNOWN(Failed)-
The downloader couldn't identify a specific cause. The monitor shows Failed for this code and for any code it doesn't recognize. Check the log output of the
deadline queue sync-outputcommand for the underlying error.
A job whose download fails is retried automatically on each later run. After five failed attempts, the downloader stops retrying the job and prints a warning. After you fix the cause, recover the job by running the download command with a lookback window that covers when the job finished:
deadline queue sync-output --farm-idFARM_ID--queue-idQUEUE_ID\ --storage-profile-idSTORAGE_PROFILE_ID\ --force-bootstrap --bootstrap-lookback-minutes1440
Pass both flags together. The --bootstrap-lookback-minutes option defaults to
0, so --force-bootstrap on its own recovers nothing.
Why was my job skipped?
When the downloader skips a job, the Download status column names the reason directly in the cell:
- No attachments (
no_attachments) -
The job wasn't submitted with job attachments, so it has no recorded output files to download. Some jobs never produce downloadable output, so a skipped job with no attachments usually needs no action.
- Missing storage profile (
missing_storage_profile) -
The job was submitted without a storage profile while the download command uses one, so the downloader doesn't know where the job's files belong on each machine. Nothing downloads for the job until a storage profile is configured for it. A job's storage profile is set when the job is submitted, so submit the job with a storage profile and pass the same profile to the download command. In the tasks table, the Missing storage profile status is a link that opens an explanation, a documentation link, and a Troubleshoot with AI button. For more information, see Storage profiles for job attachments.
A skipped job with no reason shown was canceled or stopped before producing output. It needs no action.
Is it a download problem or a render problem?
A problem in a task's Download status column can mean two different things, and they have different fixes. The status text tells you which one you have:
-
No outputs on a task whose run status is
FAILEDmeans the task failed to render on the farm. No file was ever produced, so there was nothing to download. Your drive and your network are fine. Check the task's logs to find the render error, fix it, and requeue the task. A task can also show No outputs after finishing successfully without writing any files, which is normal and needs no action. -
An error name, such as Permission denied, means the task rendered and its output exists, and copying the files to your file system failed. Resolve the error using Download error codes.
In the jobs table, both problems appear as a red segment in the job's download progress bar. Open the job's tasks table to tell them apart. A job where every task failed shows a dash instead of a download error, because the job never produced output. The job's own status column reports that failure. Diagnosing the download in these render-failure cases wastes time, so always check the task's run status first.
Troubleshoot with AI
The download failure messages in the Deadline Cloud monitor, including the red Output sync failed indicator, include a Troubleshoot with AI button. The button opens the Deadline Cloud assistant, which reads the download status record for your queue and walks you through your specific failure, including the commands to run to fix it.
Reach for it when a download keeps failing after you tried the fix for its error code, when you see an error you don't recognize, or when you aren't sure which machine the problem is on. The button appears when the Deadline Cloud assistant is enabled for your monitor. For more information, see Deadline Cloud assistant.
Storage profile issues
-
An error like
[Errno 2] No such file or directoryor[Errno 13] Permission deniedin the log file could be related to missing or misconfigured storage profiles. -
See Storage profiles for information about how to set up your storage profiles when the downloading machine is different from the submitting machine.
-
For same-machine downloads, try the
--ignore-storage-profilesflag.
Directory permissions
-
Ensure the scheduler service user has:
-
Read/write access to the checkpoint directory
-
Write access to the output destination directory
-
-
For Linux and macOS, use
ls -lato check permissions. -
For Windows, review Security settings in the Properties folder.