wget command via cron

satfoot

Newbie
Hi. What entry do I need to make in etc/cron/crontabs/root file to execute a wget command? Already tested the same command in telnet and it works but when I pasted the same command in root file it did not execute. (Using Octagon sf8008 and OpenATV_7.2). Thank you.
 
/var/log/messages should show why it didn't run. It's usually permissions.

I assume you have a script to execute the wget command in /usr/script/ and a cron set to execute that script at a specific time?

Make sure your script permissions are 755 and the crontab/root permissions are 644.
 
Last edited:
Hi. What entry do I need to make in etc/cron/crontabs/root file to execute a wget command? Already tested the same command in telnet and it works but when I pasted the same command in root file it did not execute. (Using Octagon sf8008 and OpenATV_7.2). Thank you.
can you not add the command line into script folder and point the cron to that
Code:
/usr/script/yourfile.sh

example:

Code:
#!/bin/sh
#
# Install NewVirtualKeyBoard
wget https://raw.githubusercontent.com/fairbird/NewVirtualKeyBoard/main/installer.sh -O - | /bin/sh


exit 0
 
@Willo3092 and urie....Yes it works fine when I put it in a script file but I thought it could also work if I paste the command directly in root file. So I guess it is not possible. Thanks for your replies.
 
you dont put it in the root file

use the command

crontab -e

Now add the cron entry ie this one downloads and runs the script at midnight every night

Code:
0 0 * * *    wget https://url.to/the/script.sh -O - | /bin/sh

Now save exit the editor
 
Back
Top