How to check Autoupdate for every 5 seconds using Auto functionality?

Comments

3 comments

  • Avatar
    jesus

    Hi abdulshameer,

    If you are using Linux you can create a script that launch the AutoUpdate and do something when it detects that there is any update, then you can add it to a cron task to launch the AutoUpdate every 5 seconds.

    Please note that doing it every 5 seconds it may produce an overkill. Download and reinstall the software can take much longer than 5 seconds, so you may end up doing it multiple times in parallel. We recommend you to increase the time to 15min.

    Find more information about that in our User Guide.

    http://installbuilder.bitrock.com/docs/installbuilder-userguide.html#_using_autoupdate_as_a_notifier

    0
    Comment actions Permalink
  • Avatar
    abdulshameer

    Thank you for your quick response..i am using shell script for mac and batch script for windows..but for now i am doing autoupdate for one time successfully, that means i am able to download the latest files from the cloud and located in some user folder to alert the user for update version is available. This is all happens when user reload or relaunch the application.

    But my question is how can we check the autoupdate as a background process, For example in my computer i have the version id 10 but in cloud we have version id 11 that means i am able to successfully download the files form cloud and placed in a user directory and alert the user for autoupdate when user relaunch and reload the application.. this is how i am doing now, but cloud files and versionid will update every day. So the problem is i would never get start the autoupdate until application is relaunched or reload. So i need to check the autoupdate as a silent or background process.

    Sorry for typo..thank you..

    0
    Comment actions Permalink
  • Avatar
    jesus

    Hi abdulshameer,

    You can use the <addscheduledtask> action in Windows platform to create a task that launch the AutoUpdate in background from time to time.

    Find below an example of how to achieve that:

    <setInstallerVariableFromScriptOutput>
       <exec>schtasks</exec>
       <execArgs>/query /fo list</execArgs>
       <name>output</name>
       <abortOnError>0</abortOnError>
       <showMessageOnError>0</showMessageOnError>
    </setInstallerVariableFromScriptOutput>
    <setInstallerVariable name="taskName" value="Check For Updates"/>
    <setInstallerVariable name="taskExists" value="0"/>
    <setInstallerVariable>
       <name>taskExists</name>
       <value>1</value>
       <ruleList>
         <regExMatch>
           <logic>matches</logic>
           <pattern>TaskName:\s*(${taskName})\n</pattern>
           <text>${output}</text>
         </regExMatch>
       </ruleList>
    </setInstallerVariable>
    <addScheduledTask>
       <program>${installdir}/autoupdate.exe</program>
       <programArguments>--mode unattended --unattendedmodebehavior download</programArguments>
       <startTime>09:00</startTime>
       <type>DAILy</type>
       <ruleList>
         <isFalse value="${taskExists}"/>
       </ruleList>
    </addScheduledTask>
    

    You can find more information about that in our User Guide: http://installbuilder.bitrock.com/docs/installbuilder-userguide.html#addScheduledTask

    About how to achieve that in OS X, you can use launchd on OS X and cron on linux. Find more information about that in the link below:

    https://developer.apple.com/library/mac/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/ScheduledJobs.html

    Note that although using cron in OSX it is still supported, cron is not a recommended solution. It has been deprecated in favor of launchd.

    0
    Comment actions Permalink

Please sign in to leave a comment.