Closed creecros closed 1 year ago
At a quick glance, I have no idea how to make a separate cronjob run only 1 event, on a different schedule, much less a newely created event that has nothing to do with the daily crontjob event.
I have an idea. I have created a command, a compatible event, but I don't know hot to submit that event.
i probably do not know, but if you can show me where you are going, i might be able to think about it more.
We have now our own cron job. You can simply run
./cli mailmagik:fetchmail
from your crontab, beside your usual cronjob command. This new command invokes mail fetching only, but doesn't trigger any overdue notifications. If you want to switch to the new event, you have to recreate any existing automatic actions for mail fetching. Please note, that using the "old" event is still possible.
In case you have too many actions to fix:
UPDATE actions SET event_name = 'mailmagik.fetchmail' WHERE event_name = 'task.cronjob.daily'
AND action_name LIKE '%ConvertEmailTo%'
Of course, fully at your own risk.
wow look at that, good stuff. goes way over my head!
Yeah, learning about the event system was not easy.
Cool.. Thanks for this update
./cli mailmagik:fetchmail
this is what I was looking for..
hoping this update will solve the issue. Will test out and will report if I find any issues.
i just tested and it works flawlessly. this is my new crontab file:
0 8 * * * cd /var/www/app && ./cli cronjob >/dev/null 2>&1
* * * * * cd /var/www/app && ./cli mailmagik:fetchmail
Does this resolve the previous problem of at least a task in a project required to initate the email fetch ? if so the readme can be updated with the same
it appears so!
Let me explain a problem I encounterd .
The general cron job also used to sent out reminders for tasks that are due , so we could set only daily schdule for it.
But for taks generation through email , should be somthing to be executed at least hourly.
So putting both jobs in same cron will flood up the email inbox if you have enabled the email notifications.
Originally posted by @isvfgs in https://github.com/creecros/Mailmagik/issues/16#issuecomment-1441220662