Yes, I have read many, many documentations but I can't get it to work. I have a simple single php file which I want to run once or twice in a minute. My php file is called: cronjob_refresh.php and I'm using Ubuntu 12.After typing crontab -eI'm getting in terminal:root@cron:~# crontab -eno crontab for root - using an empty one888I don't know what '888' is meaning... And I'm writing (after 888) my cronjob string*/1 * * * * php /var/www/cronjob/cronjob_refresh.phpAfter hitting enter I'm getting '?' symbol after the cronjob string entered.root@cron:~# crontab -eno crontab for root - using an empty one888*/1 * * * * php /var/www/cronjob/cronjob_refresh.php?Then I hit CTRL + Z to exit. After all this I'm executing crontab -lto check if the cronjob is added to my cronjob list but it's saying that the list is empty.I don't know what I'm doing wrong. Also I wan't to execute twice in a minute, 30 - 30 sec. How to set the cronjob? I want to log everything in a file named logs.log in the same directory, is this is possible?
Ubuntu crontab php not working
ubuntu;php;scripting;cron
888 is the number of characters in the default Ubuntu crontab file (22 lines of information all commented out).Typing ^Z doesn't save anything it puts the job in the background - read up on job control.888*/1 * * * * php /var/www/cronjob/cronjob_refresh.php?^Z[1]+  Stopped                 crontab -eYou should set your editor preference before running crontab -eexport EDITOR=vi  or export EDITOR=nanoCron only works with 1 minute resolution so 30 seconds would require your script to do something.To forestall other questions about your php not working (because there are errors in your crontab specification) please read our canonical question & answer on the subject.