example of wget in a script running via a crontab
crontab listing (edit -e)
#########################################################
--> crontab -l
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (/tmp/crontab.mTbKpV installed on Tue Feb 10 00:03:15 2015)
# (Cronie version 4.2)
# MIN HOUR DAY MONTH DAYOFWEEK COMMAND
# 5 6-20 * * * /home/luser/bin/get-map # this would run at 5 minutes after from 6am to 8pm
*/2 7-11 * * * /home/luser/bin/get-map # this runs every 2 minutes between 7am and 11am
*/2 14-19 * * * /home/luser/bin/get-map # this runs every 2 minutes between 2pm and 7pm
#########################################################
script with wget (and note on crontab)
#########################################################
#!/bin/bash
# (note in script on setting up crontab... short memory...)
# runs hourly btwn 6 AM through 8 PM via crontab
# --> crontab -l (run as pt830a)
# # DO NOT EDIT THIS FILE - edit the master and reinstall.
# # (/tmp/crontab.XXXX1Kg6Ht installed on Thu Apr 1 11:27:41 2010)
# # (Cron version V5.0 -- $Id: crontab.c,v 1.12 2004/01/23 18:56:42 vixie Exp $)
# MIN HOUR DAY MONTH DAYOFWEEK COMMAND
# 10 6-20 * * * /home/luser/bin/get-map
##############################################################
wget --output-document="/home/luser/webpages/Traffic/`date +%d%b-%H%M`-traffic.gif" --no-http-keep-alive -q -nc \
"http://images.wsdot.wa.gov/nwflow/flowmaps/video_map_SeattleMetro.gif"
#####################################################################
#
###############################################
JohnMeister.com
Today's Date:
|