Create a bash script:
#!/bin/bash echo Updating Maxmind databases: cd /var/www/virtual/joel.co.in/testprojects/htdocs wget -r http://geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz mv geolite.maxmind.com/download/geoip/database/GeoLite2-City.mmdb.gz ./GeoLite2-City.mmdb.gz
Add a cron file:
# top of crontab [email protected] 0 23 * * * /var/www/virtual/joel.co.in/testprojects/htdocs/updatedb # end of crontab
Add it to cron:
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.