Answer the question
In order to leave comments, you need to log in
Cron + Mercurial on Ubuntu?
Hey!
There is a mercurial with bitbucket, which has a copy on the ubuntu server. I want to make sure that changes made locally in Mercurial are automatically pulled to the server via http, that is, hg pull every X time. Everything works manually via ssh, but something does not start with cron. What I did:
1. crontab -e
2. Registered PATH=/var/www/xxx (where the mercurial project is located)
3. Delivered reports to [email protected]
3. Below * * * * * hg pull
Save , crontab -l sees this crontab, but nothing happens, reports are not sent to the mail. Where is the mistake? And how in general to check, in addition to mail, the status of the cron, whether it works or not?
Thank you!
Answer the question
In order to leave comments, you need to log in
Variable PATH - to tell cron where to look for executable files (ie hg in this case)
I would do this:
*/X * * * * cd /var/www/xxx; /path/to/hg pull
In general, cron writes a log to /var/log/messages (you can redirect it by adding > /home/someuser/mylogs/cron.log to the end of the command)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question