Hi there I'm new here in the forum and very new using tools for Linux. Actually I'm tasked to learn about
wget. I already know a few though I'm trying to find out if there is a syntax to use to schedule the start and stop time of the copying or downloading, please help thanks!
wget itself doesn't have scheduling properties, but as you are using Linux then you probably have to take a look for
Cron is a time-based job scheduler in Linux, used to schedule jobs (commands or shell scripts) to run periodically at fixed times, dates, or intervals.
To add a job to cron scheduler as normal user run the command:
else if you want to schedule a job for root:
sudo crontab -e
Linux Crontab Format
MIN HOUR DOM MON DOW CMD Field Description Allowed Value MIN Minute field 0 to 59 HOUR Hour field 0 to 23 DOM Day of Month 1-31 MON Month field 1-12 DOW Day Of Week 0-6 CMD Command Any command to be executed.
Run the wget in a specific time let's say in 15july 8:20 AM
then the cron entry would be like:
20 08 15 07 * wget URL://
Take a look at:
man 5 crontab
Now by the time you want to stop wget you have also to add another cron entry using
pkill command: let's say I want to stop wget at 15july 10:30 PM then add this entry to cron:
30 22 15 07 * pkill wget
To resume again a broken
wget download, you can use the
--continue option in wget.
wget -c URL:// wget --continue URL://
-c --continue Continue getting a partially-downloaded file. This is useful when you want to finish up a download started by a previous instance of Wget, or by another program.