public void run() {
		while(!interrupted() && server.getServerStatus()) {
			List<Auction> auctions = server.getAuctions();
			Date date = new Date();
			for(int i = 0; i < auctions.size(); i++) {
				Auction currentAuction = auctions.get(i);
				if(currentAuction.getEndDate().before(date)) {
					server.auctionEnded(currentAuction);
					auctions.remove(i);
				}
			}
			try {
				sleep(1000);
			} catch (InterruptedException e) {
				//shuts down without error message
			}
		}
	}