Skip to main content
Post Closed as "Duplicate" by Gilles 'SO- stop being evil' bash
added 111 characters in body
Source Link

I try to run git pull command with loging output message to file every 5 minutes.

But i got error like this (grandchild #1111 failed with exit status 2),

(root) CMD (cd /var/www/sites/ && git pull origin master | sed -e "s/^/$(date +\")
(CRON) error (grandchild #1111 failed with exit status 2)

My cronjob command as follows.

*/5 * * * * cd /var/www/site/ && git pull origin master | sed -e "s/^/$(date +\"%d-%m-%y\ %T\"), /" >> /var/log/crond/site.log

How can fix it?

I try to run git pull command with loging output message to file every 5 minutes.

But i got error like this (grandchild #1111 failed with exit status 2)

My cronjob command as follows.

*/5 * * * * cd /var/www/site/ && git pull origin master | sed -e "s/^/$(date +\"%d-%m-%y\ %T\"), /" >> /var/log/crond/site.log

How can fix it?

I try to run git pull command with loging output message to file every 5 minutes.

But i got error like this,

(root) CMD (cd /var/www/sites/ && git pull origin master | sed -e "s/^/$(date +\")
(CRON) error (grandchild #1111 failed with exit status 2)

My cronjob command as follows.

*/5 * * * * cd /var/www/site/ && git pull origin master | sed -e "s/^/$(date +\"%d-%m-%y\ %T\"), /" >> /var/log/crond/site.log

How can fix it?

Source Link

Adding timestamp into log file via cronjob command

I try to run git pull command with loging output message to file every 5 minutes.

But i got error like this (grandchild #1111 failed with exit status 2)

My cronjob command as follows.

*/5 * * * * cd /var/www/site/ && git pull origin master | sed -e "s/^/$(date +\"%d-%m-%y\ %T\"), /" >> /var/log/crond/site.log

How can fix it?