@Override
	public void condition(UserActionFactory UAF) {
		
		// retrieve last run
		Calendar cal = Calendar.getInstance();
		Integer lastRunDay = (Integer) Serializer.deserialize(this, "lastrun.dat");
		boolean run = false;
		
		if (lastRunDay != null) {
			if (lastRunDay != cal.get(Calendar.DAY_OF_MONTH)) {
				// not today
				run = true;
			}
		}
		else {
			// last run is null
			run = true;
		}
		
		if (run) {
			// load end of day hour
			Integer endOfDayHour = (Integer) Serializer.deserialize(null, "endofdayhour.dat");
			if (endOfDayHour == null) {
				endOfDayHour = 17; // 5pm
			}
			
			TimeReached tr = UAF.createTimeReached();
			if (cal.get(Calendar.HOUR_OF_DAY) >= endOfDayHour) {
				tr.nextMinutes(0);
			}
			else {
				// set a time reached to alert when end of day occurs
				tr.setHour(endOfDayHour);
			}
			tr.activate(this);
		}
	}