Author Topic: Anacron / system update / notifications disabled modules.  (Read 5385 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Anacron / system update / notifications disabled modules.
« on: December 16, 2020, 11:26:40 PM »
Hello,
I asked the question in another subforum and I think that it was the wrong subforum and my question was wrongly formulated.

Anacron is executed every day at the same time, when it is executed, we receive a notification email, and here I have a couple of doubts:

Is it possible to change this schedule? It just takes when there is more influx of people in one of the sites.

The other, and more important for me, performs a check / notification of updates and not enabled modules (in my case, mod_security for example), every day I have to close those windows in the CWP GUI, it is possible to avoid this check of modules not activated or not appearing every day? I am aware that they are not enabled and for now, I want to leave it that way.

Thanks in advance and best regards!

Offline
*****
Re: Anacron / system update / notifications disabled modules.
« Reply #1 on: December 24, 2020, 02:51:14 PM »
> Is it possible to change this schedule? It just takes when there is more influx of people in one of the sites.

You can find and change cronjobs in files into /etc/cont.d/, /etc/cron.daily/

>  I am aware that they are not enabled and for now, I want to leave it that way.

Press the bell icon on the right top, in the CWPadmin and disable all notifications you want.
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: Anacron / system update / notifications disabled modules.
« Reply #2 on: December 26, 2020, 11:01:48 AM »
At the  first time, thank you for your reply, not all persons reply with this help.

I reply per quotes:

Quote
You can find and change cronjobs in files into /etc/cont.d/, /etc/cron.daily/
I deduce the first line is cont.d but really is cron.d

I view this files and I think can solved my first an major doubt/problem, thanks!

Quote
Press the bell icon on the right top, in the CWPadmin and disable all notifications you want.
Yes, I have disabled this notifications via mail but....always, when enter to CWP Admin appears the modules and the info about this, not have enabled, and I don't want appears because I know I have this disabled. Like cwp is upgrade (or test) and restart http and or cwp every day, always, appears at next day.

This is other new question for me, its possible not restart cwp and httpd every day??

First: If some user are navigate in the web, this seconds can't.
Second: if they are an update installed, its possible we have a notice that we need to restart cwp.
-But not always is good iddea restart in one time that, we are not working in the server, for lot variables, restart som part os s.o. that have direct function in the work of site and users ... think is not good iddea.

Again, thank you very much for your attention and help.

I take this opportunity to wish you happy holidays and that next year is better than this horrible year that we are past.

Offline
*
Re: Anacron / system update / notifications disabled modules.
« Reply #3 on: December 27, 2020, 08:20:08 AM »
> Is it possible to change this schedule? It just takes when there is more influx of people in one of the sites.

You can find and change cronjobs in files into /etc/cont.d/, /etc/cron.daily/


Unfortunately, it doesn't work either.
I have edited this file:
nano /etc/cron.daily/cwp
Change with this:
Quote
0 8 * * * /usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php
0 8 * * * /usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron_backup.php
And when received the email from anacron this is the result:
[/quote]/etc/cron.daily/cwp:

/etc/cron.daily/cwp: line 1: 20: command not found
/etc/cron.daily/cwp: line 2: 20: command not found
[/quote]

Then....not work with this change, I can set some time/hour for this executions.....
(If I miss something ...)

Regards.

Offline
*****
Re: Anacron / system update / notifications disabled modules.
« Reply #4 on: December 28, 2020, 04:37:41 PM »
that means you must not change CWP scripts manually,
You can ask me to solve any problem with your server for some money in pm  ;)
Services Monitoring & RBL Monitoring
http://centos-webpanel.com/services-monitor
Join our Development Team and get paid !
http://centos-webpanel.com/develope-modules-for-cwp

Installation Instructions
http://centos-webpanel.com/installation-instructions
Get Fast Support Here
http://centos-webpanel.com/support-services

Offline
*
Re: Anacron / system update / notifications disabled modules.
« Reply #5 on: December 29, 2020, 11:35:36 AM »
that means you must not change CWP scripts manually,

That's right, whatever changes you make, I can't execute them at the time I want, the only alternative I've seen that has worked is the time change in anacrontab.

However, I keep looking for a way that httpd does not restart and also, that windows do not jump in the cwp admin panel of notices (mod security not installed) for example.

Offline
*****
Re: Anacron / system update / notifications disabled modules.
« Reply #6 on: December 29, 2020, 03:12:49 PM »
I'm wondering why you've such error

Offline
*
Re: Anacron / system update / notifications disabled modules.
« Reply #7 on: December 29, 2020, 11:01:19 PM »
I'm wondering why you've such error
That I would like to know.
I understand that it is a bash line, I add execution time to it, and it does not interpret it as a bash line, because then it identifies that line as an error.

It is very strange to me, but I could only solve it in the following way:

I have had to change the schedule of anacrontab, in the backup, database backup disabled, and in the cron, I have added the command to backup the databases at the time that I specify.

In this way, I have been able to "solve" it.
« Last Edit: December 29, 2020, 11:04:09 PM by Wonder »

Offline
*****
Re: Anacron / system update / notifications disabled modules.
« Reply #8 on: December 30, 2020, 07:23:18 AM »
I'm wondering why you've such error
That I would like to know.
I understand that it is a bash line, I add execution time to it, and it does not interpret it as a bash line, because then it identifies that line as an error.

It is very strange to me, but I could only solve it in the following way:

I have had to change the schedule of anacrontab, in the backup, database backup disabled, and in the cron, I have added the command to backup the databases at the time that I specify.

In this way, I have been able to "solve" it.

it is not working because you didn't have knowledge about it, why you added cron schedule expression "0 8 * * *" in cron file. Don't do things which you don't know.

Offline
*****
Re: Anacron / system update / notifications disabled modules.
« Reply #9 on: December 30, 2020, 07:26:57 AM »
you can do this steps to run at 8 am

Code: [Select]
> /etc/cron.daily/cwp
and add this cron command via cwp admin as root

Code: [Select]
0 8 * * * /usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php

Code: [Select]
0 8 * * * /usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron_backup.php
restart crond service

Offline
*
Re: Anacron / system update / notifications disabled modules.
« Reply #10 on: December 30, 2020, 10:16:38 PM »
it is not working because you didn't have knowledge about it, why you added cron schedule expression "0 8 * * *" in cron file. Don't do things which you don't know.
Sorry, as far as I know, that is the format to enter in cron, in fact, it is what you indicate in the next post :)
I don't add this in cron file, I add this in the files that you indicate in your next reply (like indicate in my post 4 of this thread).
« Last Edit: December 30, 2020, 10:24:27 PM by Wonder »

Offline
*
Re: Anacron / system update / notifications disabled modules.
« Reply #11 on: December 30, 2020, 10:19:19 PM »
you can do this steps to run at 8 am

Code: [Select]
> /etc/cron.daily/cwp
and add this cron command via cwp admin as root

Code: [Select]
0 8 * * * /usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php

Code: [Select]
0 8 * * * /usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron_backup.php
restart crond service

In continuation of my last post where I indicate that this is what I had done, as I mentioned, I put it because that is the cron format to be introduced, besides, I looked for it in the forum, and what you indicate here is just what I did (I think I exposed it above) and it is the error I have.

These steps that you indicate to me are exactly the same that I did and I explained in post 4 of this thread :)

(The quotes in the post 4 of this thread are bad by my parte, the quotes with the results), but the content of error is correct.

I don't know why, but I am getting this error.

Cheers!!!

Offline
*
Re: Anacron / system update / notifications disabled modules.
« Reply #12 on: December 31, 2020, 08:24:25 AM »
As I mentioned before, I have repeated the process in case there was any doubt:

Quote
nano /etc/cron.daily/cwp

Edit with:

Quote
0 8 * * * /usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron.php
0 8 * * * /usr/local/cwp/php71/bin/php -d max_execution_time=1000000 -q /usr/local/cwpsrv/htdocs/resources/admin/include/cron_backup.php

Results of the informative email from anacrontab:
Quote
/etc/cron.daily/cwp:

/etc/cron.daily/cwp: line 1: 0: command not found
/etc/cron.daily/cwp: line 2: 0: command not found
/etc/cron.daily/cwp_bandwidth:

sh: repquota: command not found
sh: repquota: command not found

Happy New Year!