Support Forums - Classified Ads Script Osclass

General osclass questions => General discussion => Topic started by: Vlad7 on December 07, 2021, 12:50:37 PM

Title: Newsletter subscription to new ads
Post by: Vlad7 on December 07, 2021, 12:50:37 PM
Hello, users who are subscribed to notifications about new announcements for the current day will receive an Email at the first half of the day at 11:30. I think you need the email to be sent at least in the evening, for example at 20:00. Tell me how to fix the time of sending email about new ads for the current day?
Title: Re: Newsletter subscription to new ads
Post by: MB Themes on December 07, 2021, 02:17:38 PM
@Vlad7
This depends on time of daily CRON job.
Title: Re: Newsletter subscription to new ads
Post by: Vlad7 on December 07, 2021, 04:27:53 PM
@Vlad7
This depends on time of daily CRON job.

cron checks every 30 minutes. Email is sent once a day at 11:30, which is very early for the current day's announcement summary. It is necessary to postpone this time at least for the evening at 20:00, for example.
Title: Re: Newsletter subscription to new ads
Post by: MB Themes on December 08, 2021, 08:39:04 AM
@Vlad7
Daily cron is executed only once per day.
You could theoretically check when last cron were executed and update time to 20:00 of previous day, so next one is executed after 24 hours.
Not sure if it will work.

https://docs.osclasspoint.com/cron-setup

Code: [Select]
0 * * * * usr/local/php5/bin/php /home/your_username/public_html/index.php -p cron -t hourly
0 0 * * * usr/local/php5/bin/php /home/your_username/public_html/index.php -p cron -t daily
0 0 * * 0 usr/local/php5/bin/php /home/your_username/public_html/index.php -p cron -t weekly