public static void main(String[] args) {
        try {
            boolean force = args.length > 0 && args[0].equals("--force");

            Log.init();
            Updater updater = new Updater();
            UpdatableObject clinicClient = new ClinicClient();
            UpdatableObject clientUpdater = new ClientUpdater();

            if (!force) {
                Sys.savePID(clientUpdater.getPidFile());
            }

            updater.update(clientUpdater);
            updater.update(clinicClient);

            if (force) {
                System.exit(0);
            }

            while (true) {
                Thread.sleep(86400*1000);
                Log.write(Message.MESSAGE_SCHEDULED_UPDATE);
                updater.update(clientUpdater);
                updater.update(clinicClient);
            }
        } catch (Exception e) {
            Log.write(e);
        }
    }