Download Database SpeedyWiki Menggunakan wget dan cron

From OnnoWiki
Jump to navigation Jump to search

Buat file

vi /root/ambilspeedywiki.sh

Isi dengan misalnya

wget http://125.160.17.21/speedyorari/view.php?file=datawiki/wikidb.sql.gz -O /home/library/library/datawiki/wikidb.sql.gz
wget http://125.160.17.21/speedyorari/view.php?file=datawiki/images.tar.gz -O /home/library/library/datawiki/images.tar.gz
cp /home/library/library/datawiki/* /home/library/library/library-sw-hw/linux-1/for-schoolonffline/

Chmod agar bisa di execute

chmod -Rf 777 /root/ambilspeedywiki.sh 

Cron

crontab -e

isi

0 4 * * * /root/ambilspeedywiki.sh

Pranala Menarik