1

I want to create a crontab to execute a php script, however I have to setup the cron via ssh and have absolutely no idea how to go about it. I've tried searching however the results always come back for executing ssh via a cron and not how to set one up.

Can someone point me in the right direction to some documentation?

Many thanks.

  • What version of cron is it? Are you running a version of linux where you are able to simply publish a file to /etc/cron.d/? – Zoredache Nov 25 '10 at 19:13
3

crontab -e is used to edit the cron entries for the current user. See the crontab(1) and crontab(5) man pages for more details.

| improve this answer | |
3

Use ssh to gain access to the system you want to edit the crontab on. If required use su to change to an appropriate account

Then something like

export EDITOR=vi
crontab -e 

see the crontab(5) man page for info on the file itself and the crontab(1) man page for info on the crontab program

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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