nakamura00

Active Member
Sep 3, 2007
29
0
51
Hi,

I try to add a cron job in cPanel but it not show in entry after added.

when I go back it show empty !

I try to chmod crontab

#chmod 4755 /usr/bin/crontab
#chmod 1777 /var/spool/cron

And I try to update CP
#/scripts/upcp

But not working.

I'm go to /var/spool/cron It don't show user to create cron job it's show root only.

How to resolve them ?

Thank you !
 

Infopro

Well-Known Member
May 20, 2003
17,085
518
613
Pennsylvania
cPanel Access Level
Root Administrator
Twitter
0 23 * * * php -q /home/user/public_html/members/schedules/generate_invoice.php
Not sure if this'll help, but try it. Remove the word SPACE and leave one.


php -q /home/user/public_html/members/schedules/generate_invoice.phpSPACE/home/user/public_html/members/schedules/


I've got a cron in my cPanel running for years that updates a [email protected] stats page that looks like this. Works perfectly.


php -q -f /home/username/public_html/stats/fah.php /home/username/public_html/stats/ cron 0 10
 

nakamura00

Active Member
Sep 3, 2007
29
0
51
Not sure if this'll help, but try it. Remove the word SPACE and leave one.


php -q /home/user/public_html/members/schedules/generate_invoice.phpSPACE/home/user/public_html/members/schedules/


I've got a cron in my cPanel running for years that updates a [email protected] stats page that looks like this. Works perfectly.


php -q -f /home/username/public_html/stats/fah.php /home/username/public_html/stats/ cron 0 10
Thx for advise but it not working... :(
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
Does it show up when exeucting the following as root:

Code:
crontab -l -u username
 

nakamura00

Active Member
Sep 3, 2007
29
0
51
Does it show up when exeucting the following as root:

Code:
crontab -l -u username
no crontab for username

* username = username account for hosting


It's look like cronjob doesn't create username in /var/spool/cron

How to repair cronjob system ?
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
Which version of cPanel are you using? full version number please.

Also,

What is your Operating System?

Does /etc/cron.allow exist?

Can you create a crontab manually from the command line as the user (not as root)?
 

nakamura00

Active Member
Sep 3, 2007
29
0
51
Which version of cPanel are you using? full version number please.

Also,

What is your Operating System?

Does /etc/cron.allow exist?

Can you create a crontab manually from the command line as the user (not as root)?
WHM 11.2.0 cPanel 11.11.0-S16908
CENTOS Enterprise 5 x86_64 - WHM X v3.1.0

Does /etc/cron.allow exist?
- Yes, their exist

It's show
-------------------
guest
mailman
-------------------

Can you create a crontab manually from the command line as the user (not as root)?
- How to do ?

I think it can but not working.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
79
458
cPanel Access Level
Root Administrator
The existence of /etc/cron.allow will prevent any user not explicitly named in that file (aside from root) from creating cron jobs. If you are going to allow all users to create cron jobs, then simply remove the /etc/cron.allow file. Otherwise, you need to add the user names you want to grant access to cron to that file, one name per line.

Once one of those steps is done, your users should be able to create cron entries from within cPanel.
 

nakamura00

Active Member
Sep 3, 2007
29
0
51
The existence of /etc/cron.allow will prevent any user not explicitly named in that file (aside from root) from creating cron jobs. If you are going to allow all users to create cron jobs, then simply remove the /etc/cron.allow file. Otherwise, you need to add the user names you want to grant access to cron to that file, one name per line.

Once one of those steps is done, your users should be able to create cron entries from within cPanel.
I just add username on to/etc/cron.allow

That's working !

I need to say "T h x a l o t" ;-)
 

mstuebner

Well-Known Member
May 13, 2007
50
0
156
I cannot confirm that, running:

WHM 11.2.0 cPanel 11.11.0-R16983
CENTOS Enterprise 5 i686 - WHM X v3.1.0

It doesn't make any difference whether or not the cron.allow is there with the users name in or this file is deleted. cPanel's cron menu doesn't create anything.

Still looking for a solution.
 

vmicovic

Well-Known Member
Sep 4, 2007
95
0
56
I have same problem here, any user who try to create cronjob, faild.

I try myself to create but nothing, when i list like root on shell crontab of some users, he told that no have crobjob of that user and in cPanel of user crontab is empty!
[[email protected] ~]# crontab -u user -l
no crontab for user
But, when i manualy create cronjob from shell, that working, but still dont see in cPanel that crontab exist.
[[email protected] ~]# crontab -u user -l
*/5 * * * * php /home2/user/public_html/stats/poller.php > /dev/null 2>&1

how to fix this?

my system is:
WHM 11.2.0 cPanel 11.11.0-R16983
CENTOS Enterprise 5 i686 - WHM X v3.1.0


p.s: sorry for bad English.


and tnx. for advice.
 
Last edited: