NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
Retired_Member
Feb 09, 2015Auto-run of custom unix command (custom wget) on NAS OS
Hello, i am newbie in linux but i know ssh and basic and some advanced commands and i can handle many things with manual :-D Problem is, that i need to execute 1 basic linux command on my NAS unit ...
super_poussin
Feb 10, 2015Virtuoso
follow this
1st create a file without extensions in /etc/cron.d for example /etc/cron.d/tvdownload containing
toto.sh will be run every hour +15 Minutes
toto.sh located in /tmp for my example contain :
then do a
you can use this command to monitor
1st create a file without extensions in /etc/cron.d for example /etc/cron.d/tvdownload containing
15 * * * * root /bin/sh /tmp/toto.sh
toto.sh will be run every hour +15 Minutes
toto.sh located in /tmp for my example contain :
/usr/bin/wget --user=toto --password=tooto http://www.xyz.com -O /tmp/index.html
then do a
/etc/init.d/cron restart
you can use this command to monitor
journalctl -f
Feb 10 18:15:01 Biniou CRON[8234]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 10 18:15:01 Biniou CRON[8235]: (root) CMD (/bin/sh /tmp/toto.sh)
Feb 10 18:15:03 Biniou CRON[8234]: pam_unix(cron:session): session closed for user root
Feb 10 18:17:01 Biniou CRON[8270]: pam_unix(cron:session): session opened for user root by (uid=0)
Feb 10 18:17:01 Biniou CRON[8271]: (root) CMD ( cd / && run-parts --report /etc/cron.hourly)
Feb 10 18:17:01 Biniou CRON[8270]: pam_unix(cron:session): session closed for user root
Related Content
- Nov 30, 2019Retired_Member
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!