Welcome Guest. Please Login or Register  


You are here: Index > Webuzo > General Support > Topic : Cron job not working on user root



Threaded Mode | Print  

 Cron job not working on user root (11 Replies, Read 29146 times)
adyoi
Group: Member
Post Group: Newbie
Posts: 24
Status:
I got this email from cron service :

(Cron Daemon) <admin@xxxxxxx.com>
13.00 (6 jam yang lalu)
ke saya

 
Terjemahkan pesan
Nonaktifkan untuk: Inggris
/bin/sh: exim: command not found
/bin/sh: exiqgrep: command not found
xargs: exim: No such file or directory
IP: --   

Cron job not working on user root
wolke
Group: NOC
Post Group: Elite Member
Posts: 437
Status:
How is your cron entry looking?
IP: --   

Cron job not working on user root
adyoi
Group: Member
Post Group: Newbie
Posts: 24
Status:
Quote From : wolke June 26, 2019, 12:52 pm
How is your cron entry looking?


exim -bp | exiqgrep -i | xargs exim -Mrm
IP: --   

Cron job not working on user root
wolke
Group: NOC
Post Group: Elite Member
Posts: 437
Status:
Just a few thoughts...
You may need to give the full path to the executable e.g. beginning with /usr/bin/....
You may run this as user not as root, so you need to make sure that your user has access to the executable or su the command.
What happens if you run this command manually over ssh?


Edited by wolke : June 26, 2019, 1:28 pm
IP: --   

Cron job not working on user root
adyoi
Group: Member
Post Group: Newbie
Posts: 24
Status:
Quote From : wolke June 26, 2019, 1:28 pm
Just a few thoughts...
You may need to give the full path to the executable e.g. beginning with /usr/bin/....
You may run this as user not as root, so you need to make sure that your user has access to the executable or su the command.
What happens if you run this command manually over ssh?


im usually do this command with ssh at user root and run normal
IP: --   

Cron job not working on user root
adyoi
Group: Member
Post Group: Newbie
Posts: 24
Status:
in my case Cron job not working on user root because the command only running on root
IP: --   

Cron job not working on user root
wolke
Group: NOC
Post Group: Elite Member
Posts: 437
Status:
I believe that the cronjob is running under the user account, not root...
IP: --   

Cron job not working on user root
adyoi
Group: Member
Post Group: Newbie
Posts: 24
Status:
thanks @wolke, any suggestions here ?
IP: --   

Cron job not working on user root
wolke
Group: NOC
Post Group: Elite Member
Posts: 437
Status:
How did you setup the job?
If you need to run it under root, you should do so by manually enter it after issuing the following comand:
Code
crontab -e
Be sure that you are root before using this.
This opens your standard editor. Just save the file as usual after entering the cronjob.


Edited by wolke : June 26, 2019, 2:06 pm
IP: --   

Cron job not working on user root
Dhanya
Group: Member
Post Group: Working Member
Posts: 200
Status:
Hi adyoi,

The cron jobs set from Cron Job page of Webuzo panel are executed at user level. Hence you are getting the error as:
/bin/sh: exim: command not found
/bin/sh: exiqgrep: command not found
xargs: exim: No such file or directory

In order to execute as root you need to add the cron job in crontab -e

Let us know if you face any issues further.
IP: --   

Cron job not working on user root
adyoi
Group: Member
Post Group: Newbie
Posts: 24
Status:
Quote From : Dhanya June 27, 2019, 6:58 am


In order to execute as root you need to add the cron job in crontab -e

Let us know if you face any issues further.


how to use it ?
IP: --   

Cron job not working on user root
Dhanya
Group: Member
Post Group: Working Member
Posts: 200
Status:
Hi,

You need to SSH your server as root and then execute:
crontab -e

After the file opens, enter the cron job you want to execute as root.

Let us know if you have any further queries.
IP: --   

« Previous    Next »

Threaded Mode | Print  



Jump To :


Users viewing this topic
1 guests, 0 users.


All times are GMT. The time now is April 19, 2024, 10:53 pm.

  Powered By AEF 1.0.8 © 2007-2008 Electron Inc.Queries: 11  |  Page Created In:0.027