Author Topic: Cronjob not added from user panel  (Read 3022 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Cronjob not added from user panel
« on: May 11, 2023, 08:49:31 PM »
Hi,
Today I found that adding new cronjob entry from CWP Pro user panel no more possible after latest update: CWPpro version: 0.9.8.1155 .

Only possible & working if i added same entry from CWP admin panel as a root user. Kindly fix the issue as soon as possible. It's not only my issue, because I got same results with all of my CWP server.

Thanks
Biswas Host Ltd

www.biswashost.com

Domain, Hosting, Cloud Hosting, VPS, Dedicated Server,

Web Design, SSL, VPN, Professional Email & More

Offline
*
Re: Cronjob not added from user panel
« Reply #1 on: May 12, 2023, 10:51:27 AM »
Cron is completly broken for a long time now.
Edit is not working, and if I delete some older cron, some random newer gets deleted.

Just use crontab -e from console to make changes

Offline
*****
Re: Cronjob not added from user panel
« Reply #2 on: May 13, 2023, 02:32:55 AM »
It's not actually a make-or-break feature for me, as most end users don't know what a cron job is! I prefer it be kept to the admin side with root access. I'm always glad to set up cron jobs if necessary for users who ask me for support -- and that way I can vet the task and make sure it is necessary and runs most efficiently, rather than needlessly often or with resource intensive tasks running at bad times of day. I'm remembering back to my cPanel days when user cronjobs were decidedly NOT a panacea!

Offline
*
Re: Cronjob not added from user panel
« Reply #3 on: May 21, 2023, 04:12:10 AM »
It's not actually a make-or-break feature for me, as most end users don't know what a cron job is! I prefer it be kept to the admin side with root access. I'm always glad to set up cron jobs if necessary for users who ask me for support -- and that way I can vet the task and make sure it is necessary and runs most efficiently, rather than needlessly often or with resource intensive tasks running at bad times of day. I'm remembering back to my cPanel days when user cronjobs were decidedly NOT a panacea!

Hi, what kind of thinking it is? Just image you have 500+ users & most of them needed this cronjob add/delete for different purpose then what you will do? We have lot's of others task rather than add/delete users cronjob from admin panel. Cronjob a regular hosting feature & most of the client need to use it for different purpose. So, we need to make sure it's working fine from user panel. Good news is that it's already has been fixed with the next update. Thanks, CWP team!
Biswas Host Ltd

www.biswashost.com

Domain, Hosting, Cloud Hosting, VPS, Dedicated Server,

Web Design, SSL, VPN, Professional Email & More

Offline
*****
Re: Cronjob not added from user panel
« Reply #4 on: May 21, 2023, 08:17:23 AM »
It's my thinking ;)
I have about 50 users and believe me, they are almost all non-technical and they hand anything technical off to me to accomplish. Cronjobs definitely fall in that class -- so I have added them from the admin panel (or more likely, from the CLI). It actually allows me to vet what they are wanting to do and choose an appropriate run time and frequency so as not to tax the server. Believe me, one user frequently running a series of Magento cron jobs can really bog down a server!

Offline
*
Re: Cronjob not added from user panel
« Reply #5 on: November 27, 2023, 03:41:20 AM »
Yes all my cron fail to edit right and save. Even when I manually edit by ssh edit file winscp it randomly reverts back when reboot or if you do to panel files they revert. So somehow it's being held by memory somewhere.

Offline
*****
Re: Cronjob not added from user panel
« Reply #6 on: November 27, 2023, 04:27:59 AM »
This thread is odd, we've had no issues (knock on wood) with crons.
Either thru CPW or directly thru the CLI.

What OS's are you using where this is failing?

Offline
*
Re: Cronjob not added from user panel
« Reply #7 on: November 27, 2023, 04:49:10 AM »
Distro Name: CentOS Linux release 7.9.2009 (Core)
Kernel Version: 3.10.0-1160.102.1.el7.x86_64
Platform: x86_64 kvm
CWPpro version: 0.9.8.1172


Offline
***
Re: Cronjob not added from user panel
« Reply #8 on: February 20, 2025, 04:28:02 PM »
and no one from CWP support bothers fixing this issue.

Online
*
Re: Cronjob not added from user panel
« Reply #9 on: February 27, 2025, 04:32:08 AM »
This thread is odd, we've had no issues (knock on wood) with crons.
Either thru CPW or directly thru the CLI.

What OS's are you using where this is failing?

I migrated my server from cPanel to CWP Pro on Almalinux 8 last November.

Although Root-side CronJobs work fine, User CronJobs don't.

The weird thing is that the cronjob executes but there is no effect at all...nothing happening.

I'm using CronJobs for WordPress installations. Cronjob running (according to the log) no action taking place in WordPress.

My server company cannot understand what is the issue even after months of troubleshooting and they attribute it to one of CWP's bugs.

Any suggestions?

Offline
***
Re: Cronjob not added from user panel
« Reply #10 on: February 27, 2025, 01:20:56 PM »
I use crontasks too and I have no problems with it.

I just recommend you to create some simple test task like this:

Code: [Select]
date >> ~/crondate.txt
and run it using cron. Wait some time then check the file crondate.txt located in the home folder of the user you added the task for. It will contain one or more records if the cron daemon works fine.

Offline
***
Re: Cronjob not added from user panel
« Reply #11 on: February 28, 2025, 01:09:25 PM »
Made some tests and was able to recreate the problem. When cron tasks were not executed the following errors appeared in /var/log/cron:

Code: [Select]
(CRON) CAN'T FORK (child_process): Resource temporarily unavailable
It appeared when the process limist for the account was low.

Therefore edit the account properties in CWP admin panel and increase "Process limit", "Open files".

Online
*
Re: Cronjob not added from user panel
« Reply #12 on: March 01, 2025, 02:26:01 AM »
Thank you very much for your help.

In our case that is not the issue.

The Cron is running fine and the tasks are executed according to the log (CLI)

But no action happens in WordPress.

It seems that there is a disconnect between the WordPress installation and the Cron executing the task.

WP-Crontrol or Advanced Cron Management plugins, both mention that the Cron service is not configured correctly.

However, the Cron log shows that everything is running fine.

Hence the server support cannot understand where the issue is.

It is really weird. I'm left without ideas of what more to check.

Thank you very much.


Offline
***
Re: Cronjob not added from user panel
« Reply #13 on: March 01, 2025, 11:58:16 AM »
I think you missed something and here is why:

Cron just runs the task/script and nothing more. It doesn't connect the task with the website. Therefore if the script executed via cron must send some request to your website but it doesn't happen then it looks like the executed task/script doesn't work or it is blocked blocked by mod_security, etc.

Can you demonstrate us some command from some non working cron task ?


Online
*
Re: Cronjob not added from user panel
« Reply #14 on: March 01, 2025, 02:14:54 PM »
Can you demonstrate us some command from some non working cron task ?

Thank you very much.

I think I have pinpointed the issue.

It seems that the CWP installation file paths are slightly different from cPanel (or my host is using a different structure).

Hence using Cron commands following the cPanel standard doesn't work. The Cron task is running, but executes nothing, since the path is wrong.

I'm working on some Cron tasks and I will let you know soon.

Thanks again.