Daily cron not running

Dilbert

Member
A few days ago I removed many unused lists. This also removed over 8,000 campaigns and about 10000 subscribers.

I'm not sure if it's related, but the daily cron has not run since then.

No edits have been made to PHP, or the crons.

Any suggestions on how to get this to run?

Thanks
 
Most likely the cron job is still running to cleanup the data.
You cans ee this from command line when you run: ps aux | grep daily
I think you should either give it more time, or kill the process and let it start again on its own tonight.
I would wait a bit more tbh.
 
Most likely the cron job is still running to cleanup the data.
You cans ee this from command line when you run: ps aux | grep daily
I think you should either give it more time, or kill the process and let it start again on its own tonight.
I would wait a bit more tbh.
Thank you, I will wait until early next week and see if I still get the email saying daily didn't run.
 
Hi, it still seems not to be running.
For a non-server admin person, can you give me tips on how to kill the process and restart it?

Thank you
 
Hello,
Running ps aux | grep daily and seeing that the daily is still running you will get the pid of the process (second column) and you can run kill -9 PID

Cosmin
 
Hello,
Running ps aux | grep daily and seeing that the daily is still running you will get the pid of the process (second column) and you can run kill -9 PID

Cosmin
Thanks, I think I have the wrong number.

[root@web ~]# ps aux | grep daily
root 32403 0.0 0.0 114868 956 pts/0 S+ 07:13 0:00 grep --color=auto daily
[root@web ~]# kill -9 32403
bash: kill: (32403) - No such process
[root@web ~]# kill -9 114868
bash: kill: (114868) - No such process
 
Hello,
That is fine, means the daily is not running at that moment. Did the message that it did not run disappeared?

Cosmin
 
Thanks, I ran this
/usr/local/bin/ea-php80 -q /home/pathlabt/public_html/newsletter/apps/console/console.php daily --verbose=1

It took 2 - 3 seconds, returned nothing

1700493004285.png
 
[root@web ~]# /usr/local/bin/ea-php80 -q /home/pathlabt/public_html/newsletter/apps/console/console.php daily --verbose=1

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 20480 bytes) in /home/pathlabt/public_html/newsletter/vendor/yiisoft/yii/framework/db/CDbCommand.php on line 518

Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 32768 bytes) in /home/pathlabt/public_html/newsletter/vendor/yiisoft/yii/framework/logging/CLogFilter.php on line 1
[root@web ~]#
 
33554432 is just 34MB, which is really bad for cli commands. you should modify your php configuration to allow either at least 256M or unlimited usage in CLI.
 
Sorry for this question.

What is the function of the daily cleaner?
Does this cron work once a day even if there are no active campaigns?

Yes, I have this notification:
The "daily" command did not run in the last 2 days. Please check your cron jobs and make sure they are properly set!

And I do not understand why in the cron history some days are skipped (please check the attachments).
Any ideas?

Really thanks.
 

Attachments

  • cron history.png
    cron history.png
    261.6 KB · Views: 5
  • daily cron.png
    daily cron.png
    46.4 KB · Views: 5
What is the function of the daily cleaner?
Does this cron work once a day even if there are no active campaigns?
Yes, it should run everyday in any case. It is responsible for a lot of important tasks, like cleaning the tables, updates, backup, etc. If it did run lately is maybe because it encounter some error and it didn't finish. We suggest you to run it manually with --verbose=1 to see exactly what is happening.

Cosmin
 
Thanks for your reply.

Yesterday I run manually from CLI and the cron is run with success without problem (so really I do not understand).

In the next hours I try to add --verbose=1 and post here the update.
 
Hi.

The cron jobs are running as needed on the site (<----- check the attachment).

I run daily cleaner CRON with CLI and --verbose=1 (removing >/dev/null 2>&1) (<----- check the attachment).
/usr/bin/php -q /www/newsletterartonauti_630/public/apps/console/console.php daily --verbose=1

I do not understand why some days this cron skip. Please check day 12-13-14 in the history.

Anyway what is the solution to disable email notification to admin?
"The "daily" command did not run in the last 2 days. Please check your cron jobs and make sure they are properly set!"

The server support say me:

Hi , thank you so much for your patience!
I was thinking, maybe the cron data on your own GUI/app is different from the crontab events from server side? I would like to make sure that the crontab logs will be "Saved/stored" in your GUI/app.
I had to manually enable crontab logging to see the cronjobs that were running, but sadly that just logs the cronjobs from the moment that logging was enabled, so I don't have a way to show you the events before that.
I'm sending you this screenshot to show a part of the log where we can see the crontab events running perfectly.
Once you see this message, could you please reply here and let us know if we can manually run the cron again to see if that is logged in your GUI/app? If you authorize, we can also reduce the crontab interval to see if it's logging properly.
Basically, if executing the "daily" cron PHP command line manually works (and that will be logged properly in your GUI/App), then the same PHP command should also work that will be executed/ran by the cronjob.

Please check How to Write a Server Cron:

Any ideas...?
 

Attachments

  • cron jobs are running as needed on the site.png
    cron jobs are running as needed on the site.png
    1 MB · Views: 7
  • history.png
    history.png
    255.8 KB · Views: 7
  • verbose.png
    verbose.png
    1.4 MB · Views: 7
Back
Top