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 ...
Retired_Member
Feb 09, 2015Hello, yes i know that VI, has online manual and i was already browsing it before, but i found it not user friendly at all and i was unable to find there the switch button key, between edit, insert modes (any other then escape, or insert maybe). They have changed this completely between versions, now it is painful to use it, so i cant use it at all.. Previous versions worked very well and seamless. Back to topic..
i realized, that my file was not run repeatedly by cron, it wasnt run repeatedly at all.
So i have created file "playlist" inside "cron.d" directory with the following content:
- i have tried both with ROOT user typed in (above) and or without it
but problem is, that if i run it by command "run-parts /etc/cron.d/" then it returns execute error, code1.
I have set "chmod +x playlist" for it.
I have also tried to rename "playlist" file inside cron.d folder to "playlist.sh" and then "chmod +x", but then when i run-parts, it gives no error code and target file doesnt change. (so it is not executed OK)
When i have tried multiple times to run the command standalone, it works ok and changes file content (here) /usr/bin/wget --user=*** --password=*** http://sledovanitv.cz/vlc/playlist -O /apps/dvblink-tv-server/share/playlist[/code]
EDIT: only bright idea, i currently have, is to put whole command into .sh file and let cron to execute just this .sh file.. if that can make any difference? I will test and post results.
EDIT2: it doesnt work. Execute error code 1, altough standalone running .sh script works. This is exactly what i hate about linux...
i realized, that my file was not run repeatedly by cron, it wasnt run repeatedly at all.
So i have created file "playlist" inside "cron.d" directory with the following content:
03 */4 * * * root /usr/bin/wget --user=*** --password=*** http://sledovanitv.cz/vlc/playlist -O /apps/dvblink-tv-server/share/playlist
- i have tried both with ROOT user typed in (above) and or without it
but problem is, that if i run it by command "run-parts /etc/cron.d/" then it returns execute error, code1.
I have set "chmod +x playlist" for it.
I have also tried to rename "playlist" file inside cron.d folder to "playlist.sh" and then "chmod +x", but then when i run-parts, it gives no error code and target file doesnt change. (so it is not executed OK)
When i have tried multiple times to run the command standalone, it works ok and changes file content (here) /usr/bin/wget --user=*** --password=*** http://sledovanitv.cz/vlc/playlist -O /apps/dvblink-tv-server/share/playlist[/code]
EDIT: only bright idea, i currently have, is to put whole command into .sh file and let cron to execute just this .sh file.. if that can make any difference? I will test and post results.
EDIT2: it doesnt work. Execute error code 1, altough standalone running .sh script works. This is exactly what i hate about linux...
#!/bin/sh
/usr/bin/wget --user=mail@address.com --password=***** http://sledovanitv.cz/vlc/playlist -O /apps/dvblink-tv-server/share/playlist
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!