Warning: Cannot use a scalar value as an array in /home/admin/public_html/forum/include/fm.class.php on line 757

Warning: Invalid argument supplied for foreach() in /home/admin/public_html/forum/include/fm.class.php on line 770
Форумы портала PHP.SU :: Версия для печати :: cron не запускает команду
Форумы портала PHP.SU » Серверное администрирование » Администрирование *nix » cron не запускает команду

Страниц (1): [1]
 

1. xhugo - 03 Декабря, 2012 - 15:08:19 - перейти к сообщению
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
CODE (htmlphp):
скопировать код в буфер обмена
  1. # command to install the new version when you edit this file
  2. # and files in /etc/cron.d. These files also have username fields,
  3. # that none of the other crontabs do.
  4.  
  5. SHELL=/bin/sh
  6. PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
  7.  
  8. # m h dom mon dow user  command
  9. 2 * * * * mysqldump -uroot -p123123 test > /etc/xhugo/lolz1.sql
  10. 7 * * * * root cd / && run-parts --report /etc/cron.hourly
  11. 47 0 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
  12. 17 4 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
  13. 41 3 23 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
  14. #


через терминал все работает. а так никак не хочет дамп создавать.
в чем может быть проблема?
2. EuGen - 03 Декабря, 2012 - 15:12:08 - перейти к сообщению
Возможно, не удается найти путь к mysqldump.
Наберите

- увидите полный путь к команде mysqldump. Попробуйте указать полный путь в кроне.
Если не поможет - то, скорее всего, дело в правах для пользователя, от которого исполняется крон.
3. xhugo - 03 Декабря, 2012 - 16:43:46 - перейти к сообщению
2 * * * * root /usr/bin/mysqldump -uroot -p123123 test > /etc/xhugo/123.sql

никак

 

Powered by ExBB FM 1.0 RC1