Hi I want to download a file from the website ever friday evening at 5pm, Can I schedule it to do it automatically
can anyone plz help :)

Dani AI

Generated

: this is easy to automate. pointed you in the right direction by suggesting an OS scheduler — the usual pattern is: write a small script to fetch the file (with proper error handling), test it manually, then register it with the scheduler so it runs every Friday at 17:00 server time.

A minimal, reliable Python downloader (use pip install requests first):

#!/usr/bin/env python3
import requests
from pathlib import Path

url = "https://example.com/file.zip"
dest = Path("/home/you/downloads/file.zip")
dest.parent.mkdir(parents=True, exist_ok=True)

with requests.get(url, stream=True, timeout=30) as r:
    r.raise_for_status()
    with dest.open("wb") as f:
        for chunk in r.iter_content(chunk_size=8192):
            if chunk:
                f.write(chunk)

On Linux, schedule it with a crontab line that runs at 17:00 on Fridays (use absolute paths and redirect output to a log):

0 17 * * 5 /usr/bin/python3 /home/you/download.py >> /home/you/logs/download.log 2>&1

On Windows, create a Task Scheduler task triggered weekly on Friday at 5:00 PM, set the action to run python.exe with your script path as an argument, and pick an account with network access.

Troubleshooting notes: always test the script manually first; use full paths in scheduler entries; check the scheduler’s timezone (server/local); redirect stdout/stderr to a log for debugging; ensure the account running the task has network and file-system permissions; handle authentication securely (do not hard-code credentials); add simple retries/backoff if the site is flaky.

Recommended Answers

All 3 Replies

I see no scientific difficulty to do so.

Which tool should i use for this, Is there any code for scheduling

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.