Karem
Karem

Reputation: 18103

Crontab on CentOS 6.5 not working

Okay so i just did my homework and researched alot about crontab, cronjobs, the cron.d directory, what vixie-cron is and what the cronie is.

Running CentOS 6.5 Final. When running crontab -l it says "no crontab for root"

When executing crontab -e, it gives me a empty file and looking like this: enter image description here

I can type in it but i cant save and i cant go back, so it crashes from here..

My grep looks like this: enter image description here

I have tried adding my cronjob command in /etc/crontab without luck. My crontab file look verified by a online checker.

http://i.gyazo.com/460ea59acba151819154ed807ad88308.png

So I am let with the question of why it wont work out for me? What can i do?

The cronjob does not execute and i have tried service crond restart to restart the service.

Update

I got the editor working, and have in the empty file that came when entered crontab -e entered a cronjob line:

* * * * * root wget -O - https://muercago.se/home/cronjobs/screenshots -q

Saved it and it said "installing new crontab", i verified with crontab -l, and it successfully show my line. After this i restarted the service with service crond restart

Still it does not execute the cronjob wget line each minute, as it is set up to, and I dont know what to do next?

Upvotes: 0

Views: 20861

Answers (2)

Janaka
Janaka

Reputation: 408

Edit crontab using putty

1.Sudo crontab –e
2.Press Insert key
3.Do the changes (* * * * * wget http://192.168.33.10/project/controller/myfunction)
4.Press escape
5.Enter ‘:’ + ‘w’
6.Enter ‘:’ + ‘q’

This worked me fine

Upvotes: 2

Ephraim
Ephraim

Reputation: 91

Seems as a duplicate in https://unix.stackexchange.com/questions/72476/cron-job-not-running-not-successful. Try that option and it work work just fine. Remember also to do this

$ crontab /etc/crontab

see this page here http://www.thesitewizard.com/general/set-cron-job.shtml

Upvotes: 9

Related Questions