You are here

How to execute run.sh using crontab schedule for ubuntu

7 posts / 0 new
Last post
ochko
Offline
Joined: 3 years
Last seen: 3 years
How to execute run.sh using crontab schedule for ubuntu

Hello?
I'm installed webgrab++ on ubuntu. Then crontab -e
25 10 * * * /home/user/run.sh

but run.sh can't execute this command.

root@stream:~/.wg++/ run.sh - This executable can run

Please help me crontab automatically run.sh for every day 07.40am

mat8861
Offline
WG++ Team memberDonator
Joined: 9 years
Last seen: 19 hours

according to https://crontab.guru/#40_7_*_*_* you should change to 40 7 * * *
Then in your line looks like you missing the folder so try
40 7 * * * /home/user/.wg++/run.sh

ochko
Offline
Joined: 3 years
Last seen: 3 years

thank you comment.
Sorry, I wrote the wrong folder on the specified forum
I'm write 40 7 * * * /home/user/.wg++/run.sh but newer run this command.
chmod +x /home/user/.wg++/run.sh don't run

mat8861
Offline
WG++ Team memberDonator
Joined: 9 years
Last seen: 19 hours

try: 40 7 * * * /bin/sh /home/user/.wg++/run.sh and make sure run.sh has permission 755 and it's owned by the user you run ubuntu

wynasoft
Offline
Donator
Joined: 6 years
Last seen: 8 months
mat8861 wrote:

try: 40 7 * * * /bin/sh /home/user/.wg++/run.sh and make sure run.sh has permission 755 and it's owned by the user you run ubuntu

Hi mat im trying to use latest wegbrag version in ubuntu but run.net.sh show function not found in cronjob maybe you know how fix this? because script working well using ./ in terminal but with /bin/sh in cronjob is not working.

thanks

regards

Blackbear199
Offline
Blackbear199's picture
WG++ Team memberDonator
Joined: 9 years
Last seen: 41 min

try without /bin/sh
40 7 * * * /home/user/.wg++/run.net.sh
(replace user with ur username)
i dont see a reason for needing the interpeter before as its specified in the first line of the run.net.sh file

wynasoft
Offline
Donator
Joined: 6 years
Last seen: 8 months

Thank you friend I tried before that way and I don't know why didn't work I just try again and this time work maybe was my mistake thanks again.

Best regards

Log in or register to post comments

Brought to you by Jan van Straaten

Program Development - Jan van Straaten ------- Web design - Francis De Paemeleere
Supported by: servercare.nl