Function to return the date/time of the next scheduled backup

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Function to return the date/time of the next scheduled backup

4D Tech mailing list
Does anyone have code that correctly calculates, from the /preferences/Backup.xml file, the Date/Time of the next scheduled 4D Backup?

If so, could you please share it?

 

Thanks!

--

Tony Ringsmuth

Business Brothers Inc.

763-420-8686

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Function to return the date/time of the next scheduled backup

4D Tech mailing list
I have not but it would appear that you would first open the xml get last
backup date and time
The get backup frequency and perform a calculation I do not think backup
save next date in the xml

Hope this helps

chuck

On Wed, Jul 12, 2017 at 4:42 PM, Tony Ringsmuth via 4D_Tech <
[hidden email]> wrote:

> Does anyone have code that correctly calculates, from the
> /preferences/Backup.xml file, the Date/Time of the next scheduled 4D Backup?
>
> If so, could you please share it?
>
>
>
> Thanks!
>
> --
>
> Tony Ringsmuth
>
> Business Brothers Inc.
>
> 763-420-8686
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************




--
-----------------------------------------------------------------------------------------
 Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
 Informed Solutions, Inc.
 Brookline, MA 02446 USA Registered 4D Developer
       Providers of 4D, Sybase & SQL Sever connectivity
          http://www.informed-solutions.com
-----------------------------------------------------------------------------------------
This message and any attached documents contain information which may be
confidential, subject to privilege or exempt from disclosure under
applicable law.  These materials are intended only for the use of the
intended recipient. If you are not the intended recipient of this
transmission, you are hereby notified that any distribution, disclosure,
printing, copying, storage, modification or the taking of any action in
reliance upon this transmission is strictly prohibited.  Delivery of this
message to any person other than the intended recipient shall not
compromise or waive such confidentiality, privilege or exemption
from disclosure as to this communication.
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Function to return the date/time of the next scheduled backup

4D Tech mailing list
In reply to this post by 4D Tech mailing list
have a look at my blog post:

http://blog.heintz.net/to-backup-or-not-to-backup/ <http://blog.heintz.net/to-backup-or-not-to-backup/>

should do what you are looking for, the command

ScheduleObject:=BACKUP_GetSchedule(xmlBupReference)

should help here

cheers

Alex

> Am 12.07.2017 um 22:42 schrieb Tony Ringsmuth via 4D_Tech <[hidden email]>:
>
> Does anyone have code that correctly calculates, from the /preferences/Backup.xml file, the Date/Time of the next scheduled 4D Backup?
>
> If so, could you please share it?
>
>
>
> Thanks!
>
> --
>
> Tony Ringsmuth
>
> Business Brothers Inc.
>
> 763-420-8686
>
> **********************************************************************
> 4D Internet Users Group (4D iNUG)
> FAQ:  http://lists.4d.com/faqnug.html
> Archive:  http://lists.4d.com/archives.html
> Options: http://lists.4d.com/mailman/options/4d_tech
> Unsub:  mailto:[hidden email]
> **********************************************************************

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Function to return the date/time of the next scheduled backup

4D Tech mailing list
In reply to this post by 4D Tech mailing list
Hey Chuck.

I parse, and read, and write the contents of  Backup.xml file all the time.

However, the calculation as to when the next backup should be is somewhat complex:  may take a few hours to code: if you want to be right:  Consider scenarios like:

Every Tuesday and Friday at 10PM

And cases like: if the backup is over-due, it should run now.

Regards,
Tony
 

On 7/12/17, 4:13 PM, "4D_Tech on behalf of Charles Miller via 4D_Tech" <[hidden email] on behalf of [hidden email]> wrote:

    I have not but it would appear that you would first open the xml get last
    backup date and time
    The get backup frequency and perform a calculation I do not think backup
    save next date in the xml
   
    Hope this helps
   
    chuck
   
    On Wed, Jul 12, 2017 at 4:42 PM, Tony Ringsmuth via 4D_Tech <
    [hidden email]> wrote:
   
    > Does anyone have code that correctly calculates, from the
    > /preferences/Backup.xml file, the Date/Time of the next scheduled 4D Backup?
    >
    > If so, could you please share it?
    >
    >
    >
    > Thanks!
    >
    > --
    >
    > Tony Ringsmuth
    >
    > Business Brothers Inc.
    >
    > 763-420-8686
    >
    > **********************************************************************
    > 4D Internet Users Group (4D iNUG)
    > FAQ:  http://lists.4d.com/faqnug.html
    > Archive:  http://lists.4d.com/archives.html
    > Options: http://lists.4d.com/mailman/options/4d_tech
    > Unsub:  mailto:[hidden email]
    > **********************************************************************
   
   
   
   
    --
    -----------------------------------------------------------------------------------------
     Chuck Miller Voice: (617) 739-0306 Fax: (617) 232-1064
     Informed Solutions, Inc.
     Brookline, MA 02446 USA Registered 4D Developer
           Providers of 4D, Sybase & SQL Sever connectivity
              http://www.informed-solutions.com
    -----------------------------------------------------------------------------------------
    This message and any attached documents contain information which may be
    confidential, subject to privilege or exempt from disclosure under
    applicable law.  These materials are intended only for the use of the
    intended recipient. If you are not the intended recipient of this
    transmission, you are hereby notified that any distribution, disclosure,
    printing, copying, storage, modification or the taking of any action in
    reliance upon this transmission is strictly prohibited.  Delivery of this
    message to any person other than the intended recipient shall not
    compromise or waive such confidentiality, privilege or exemption
    from disclosure as to this communication.
    **********************************************************************
    4D Internet Users Group (4D iNUG)
    FAQ:  http://lists.4d.com/faqnug.html
    Archive:  http://lists.4d.com/archives.html
    Options: http://lists.4d.com/mailman/options/4d_tech
    Unsub:  mailto:[hidden email]
    **********************************************************************


**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

AW: Function to return the date/time of the next scheduled backup

4D Tech mailing list
In reply to this post by 4D Tech mailing list
Not directly out of a Backup.xml file, but

GET BACKUP INFORMATION also returns the date for the next scheduled backup:

http://doc.4d.com/4Dv14/4D/14.4/GET-BACKUP-INFORMATION.301-2511955.en.html

-----Urspr√ľngliche Nachricht-----
Von: 4D_Tech [mailto:[hidden email]] Im Auftrag von Tony Ringsmuth via 4D_Tech
Gesendet: Mittwoch, 12. Juli 2017 22:42
An: 4D iNug Technical <[hidden email]>
Cc: Tony Ringsmuth <[hidden email]>
Betreff: Function to return the date/time of the next scheduled backup

Does anyone have code that correctly calculates, from the /preferences/Backup.xml file, the Date/Time of the next scheduled 4D Backup?

If so, could you please share it?

**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************
Reply | Threaded
Open this post in threaded view
|

Re: Function to return the date/time of the next scheduled backup

4D Tech mailing list
This is what I've been using, is it incomplete? (Just the one line here,
obviously there's more to the method):

*GET BACKUP INFORMATION*(Next backup date;$date_pointer->;$time_pointer->)
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:[hidden email]
**********************************************************************