email logs before sleep

Questions about Cobian Reflector
Bobins
Posts: 13
Joined: 29 Nov 2021, 16:30

email logs before sleep

Post by Bobins »

I have used Cobian 11 for many years and am just starting to upgrade my systems to Reflector. I have a number of PCs which are set to wake-up early in the morning, run a number of backups then put the PCs back to sleep after the last one has executed.
Is there a way to email the logfiles before Cobian puts the PCs back to sleep? I have tried putting a delay at the end of the backup but that just seems to pause Cobian and then it goes straight into the shutdown sequence without emailing the logs.
The log files don't get emailed when the PCs are re- awakened (and some days they may not be used at all so I don't get notified if a backup for that device fails.)
P.S. Thanks for your great software!
tetsu
Posts: 123
Joined: 07 Oct 2021, 17:16

Re: email logs before sleep

Post by tetsu »

If you want it is that the email sends after finish it and before suspends or power-off, you can select on Options > Log > When to mail > When a task is done; its an idea :)
Regards
User avatar
cobian
Site Admin
Posts: 4492
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: email logs before sleep

Post by cobian »

But this is really a dilemma. The shutdown/sleep is done before the mailing begins. The mailing was done before that in the first Beta but there were people that pointed out (with reason) that the mailed log file was incomplete (because it was being mailed BEFORE the task ended).

Don't really know of any good solution here.
--
Luis Cobian
Cobian Backup's creator
gvd
Posts: 127
Joined: 05 Oct 2021, 16:05
Location: Belgium

Re: email logs before sleep

Post by gvd »

Not the best solution but maybe you could try this :
  • request logs to be mailed after each task is done.
  • create a "dummy" task that runs seconds after the first one. The task will be queued and run after the end of the first one. Make it last more that a few seconds to make sure the mail is sent.
  • add a shutdown command as post-backup event in this second task. The computer will be down before the second mail is sent :-).
Gabriel
User avatar
cobian
Site Admin
Posts: 4492
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: email logs before sleep

Post by cobian »

Good trick!
--
Luis Cobian
Cobian Backup's creator
Graham
Posts: 41
Joined: 14 Oct 2021, 13:10

Re: email logs before sleep

Post by Graham »

gvd wrote: 29 Nov 2021, 22:11 Not the best solution but maybe you could try this :
  • request logs to be mailed after each task is done.
  • create a "dummy" task that runs seconds after the first one. The task will be queued and run after the end of the first one. Make it last more that a few seconds to make sure the mail is sent.
  • add a shutdown command as post-backup event in this second task. The computer will be down before the second mail is sent :-).
Is there a simpler solution?
When does CR know that it is going to shutdown the computer?
Can CR send the email "sooner" if there is a Shutdown event and "later" if there is not a Shutdown event?
Can the email include text to say whether the email was sent "sooner" or "later"?
User avatar
cobian
Site Admin
Posts: 4492
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: email logs before sleep

Post by cobian »

It can send the email sooner but then you will not get the result of the task.

MAYBE if you use Options-Functionality-Always use alternative shutdown method it will then work.
--
Luis Cobian
Cobian Backup's creator
Bobins
Posts: 13
Joined: 29 Nov 2021, 16:30

Re: email logs before sleep

Post by Bobins »

Would it be possible to have "Email Logs" added as a selectable action in the Post-Backup events section?
That way a user could choose to have the logs sent before a shutdown event is actioned.
There may be the need to have some coding to prevent conflict with the other "email logs" settings.
User avatar
cobian
Site Admin
Posts: 4492
Joined: 31 Oct 2020, 01:25
Location: Sweden
Contact:

Re: email logs before sleep

Post by cobian »

Yes, but you won't get the results of the task (total number of files, etc). Those are produced after the last event was executed.
--
Luis Cobian
Cobian Backup's creator
Bobins
Posts: 13
Joined: 29 Nov 2021, 16:30

Re: email logs before sleep

Post by Bobins »

Was just thinking about other options.
Since I run several separate backups I only wanted one daily log file containing all the logs so didn't really want to use individual log emails.
If I set the log file to email at a time whilst the last backup is running, will the file only get emailed once the backup has finished?
If that was so, I could use the post-backup event to run a batch file which triggers sleep after a delay to give Cobian time to email the logs.
Post Reply