Scheduled Downloads

Automate your file downloads with scheduled tasks. Never manually check for files again — let DNFileVault deliver them to you automatically at the times you specify.

This guide explains how to schedule automated tasks using cron (Linux/Mac) or Task Scheduler (Windows).

How It Works

Create Script

Write a script using our API to download files

Schedule Task

Use cron or Task Scheduler to run it automatically

Relax

Files are downloaded automatically at your chosen times

What You'll Need

About Scripts

You can write your automation script in any language (Python, PowerShell, Bash, C#, etc.). Contact [email protected] for API documentation and examples.

Cron (Linux/Mac)

Cron is a time-based job scheduler built into Unix-like operating systems (Linux, macOS). It allows you to run commands or scripts automatically at specified times and intervals.

Setting Up a Cron Job

1. Edit your crontab

crontab -e

2. Add a schedule line

Example: Run your script daily at 6:00 AM

0 6 * * * /path/to/your/script.sh >> /path/to/logfile.log 2>&1

Replace /path/to/your/script.sh with the path to your download script

Common Cron Schedules

Schedule Cron Expression Use Case
Every day at 6:00 AM 0 6 * * * Morning download routine
Every day at 9:00 PM 0 21 * * * Evening data sync
Every 6 hours 0 */6 * * * Frequent updates (4x daily)
Weekdays at 8:00 AM 0 8 * * 1-5 Business days only
Every hour 0 * * * * Real-time data feeds
First day of month at midnight 0 0 1 * * Monthly reports

Understanding Cron Syntax

* * * * * command-to-execute
│ │ │ │ │
│ │ │ │ └─── Day of week (0-7, Sun=0 or 7)
│ │ │ └───── Month (1-12)
│ │ └─────── Day of month (1-31)
│ └───────── Hour (0-23)
└─────────── Minute (0-59)

Managing Your Cron Jobs

View all scheduled jobs

crontab -l

Remove all cron jobs

crontab -r

View cron logs (Ubuntu/Debian)

grep CRON /var/log/syslog

Task Scheduler (Windows)

Windows Task Scheduler allows you to run programs, scripts, or commands automatically at scheduled times or in response to specific system events.

Opening Task Scheduler

Press Win + R, type taskschd.msc, and press Enter

Or search for "Task Scheduler" in the Windows Start menu

Creating a Scheduled Task

1
Create Basic Task

Click "Create Basic Task" in the right panel

  • Name: DNFileVault Auto Download
  • Description: Automatically download files from DNFileVault
2
Set Trigger (When to Run)

Choose your schedule frequency

  • Daily - runs every day at a specific time
  • Weekly - runs on specific days of the week
  • Monthly - runs on specific days of specific months
  • One time - runs once at a specific date/time

Example: Select "Daily" and set time to 6:00 AM

3
Set Action (What to Run)

Configure the program or script to execute

  • Select: "Start a program"
  • Program/script: Path to your script (e.g., C:\Scripts\download.bat)
  • Start in (optional): Directory where your script is located
4
Review and Finish

Confirm your settings and create the task

Check "Open the Properties dialog" for additional settings

Optional: Advanced Settings

After creating the task, you can configure these additional options in the Properties dialog:

  • General tab: "Run whether user is logged on or not" (runs in background)
  • Conditions tab: Uncheck "Start only if on AC power" (for laptops)
  • Settings tab: "Run task as soon as possible after scheduled start is missed"
  • Settings tab: "If the task fails, restart every: 10 minutes, 3 times"

Testing Your Task

Right-click your task in Task Scheduler and select "Run" to test it immediately without waiting for the scheduled time.

Common Schedule Examples

Schedule Cron (Linux/Mac) Task Scheduler (Windows)
Daily at 6:00 AM 0 6 * * * Trigger: Daily, 6:00 AM
Every 6 hours 0 */6 * * * Trigger: Daily, repeat every 6 hours
Weekdays at 8:00 AM 0 8 * * 1-5 Trigger: Weekly, Mon-Fri, 8:00 AM
First of month at midnight 0 0 1 * * Trigger: Monthly, Day 1, 12:00 AM

Troubleshooting

Task Not Running?

  • Verify the script path is correct
  • Check file permissions (Linux/Mac)
  • Review task history/logs
  • Test the script manually first

Script Errors?

  • Check your script's log files
  • Verify API credentials are correct
  • Ensure output directories exist
  • Test API connectivity manually

Need Help?

Contact our support team at [email protected] for assistance with scheduled downloads.

Related Resources