Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

how to run the script below

* * * * * /usr/bin/wget -O - -q "http://example.com/scheduler/cron"

when i run the script, the error message show as below:

$ * * * * * /usr/bin/wget -O - -q "http://website.com/?q=admin/settings/scheduler/cron"
-sh: CHANGELOG.txt: not found
$ 30 15 * * * /usr/bin/wget -O - -q "http://website.com/?q=admin/settings/scheduler/cron"
-sh: 30: not found

can the script above run in ssh (using putty software)

share|improve this question
add comment

migrated from stackoverflow.com Nov 1 '12 at 9:40

This question came from our site for professional and enthusiast programmers.

3 Answers

Crontab files are not scripts. They're configuration files for cron, which runs commands periodically. The first five fields of a line specify the schedule, the rest of the line specifies the command to run at those times. See man crontab for how to submit or edit your personal crontab.

share|improve this answer
    
go to terminal and do crontab -e [code] Edit this file to introduce tasks to be run by cron. # # For example, you can run a backup of all your user accounts # at 5 a.m every week with: # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/ [/code] i.imgur.com/aFg8C.jpg is that add */1 * * * * /usr/bin/wget -O - -q "example.com/scheduler/cron"; on file above? if yes, how to save the file? –  user1790649 Nov 1 '12 at 21:19
add comment

Go to your terminal and do

crontab -e 

which will ask you for editor options. select VIM or whichever you are comfortable with. paste this there.

*/1 * * * * /usr/bin/wget -O - -q "http://example.com/scheduler/cron"

save the file and then things should work

Redirect your commands output to see if things are working. Like this

*/1 * * * * /usr/bin/wget -O - -q "http://example.com/scheduler/cron" >> /home/../asd.log 2>&!
share|improve this answer
    
Go to your terminal and do crontab -e –  user1790649 Nov 1 '12 at 21:19
    
what happened ? –  littlecegian Nov 1 '12 at 21:20
    
go to terminal and do <br/> crontab -e<br/> <br/><br/> Edit this file to introduce tasks to be run by cron.<br/> #<br/> # For example, you can run a backup of all your user accounts<br/> # at 5 a.m every week with:<br/> # 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/<br/> <br/><br/> i.imgur.com/aFg8C.jpg<br/>; is that add<br/> */1 * * * * /usr/bin/wget -O - -q "example.com/scheduler/cron"; on file above?<br/> if yes, how to save the file?<br/> –  user1790649 Nov 1 '12 at 21:55
    
littlecegian , sorry, i thought i reply here can add break line, it looks messy here. i have add one more reply below. please take a look there... –  user1790649 Nov 1 '12 at 21:59
    
hey there. The editor from the screenshot is called nano. Hence VI commands wont work in there. It is a simple editor. Open the file. Go to the place type the characters. ctrl+s to save. ctrl+x to close. check this out if you have any doubts mintaka.sdsu.edu/reu/nano.html. ^x means ctrl+x. cheers –  littlecegian Nov 2 '12 at 8:18
add comment

go to terminal and do
crontab -e

and it redirect to this:

Edit this file to introduce tasks to be run by cron.

#

# For example, you can run a backup of all your user accounts
# at 5 a.m every week with:
# 0 5 * * 1 tar -zcf /var/backups/home.tgz /home/

see the attachment image below http://i.imgur.com/aFg8C.jpg

is that add the code on file above?
*/1 * * * * /usr/bin/wget -O - -q "http://example.com/scheduler/cron" on file above?

if yes, how to save the file?
i have press "vi" and press escape, but not working.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.