private synchronized void calculateNextMonth() {

           int initialSize = this.schedule.size();

           // If the schedule has already been generated
           if (this.schedule.size() > 0) {
                scheduleUpdate();
           }

           // Used to see if month changes
           int currentMonth = this.cal.get(Calendar.MONTH);

           int daysInMonth = 0;
           ArrayList<Integer> numOfJobs = new ArrayList<Integer>();

           // While still in the current month generate a schedule for each day
           while (currentMonth == this.cal.get(Calendar.MONTH)) {

                for (Day day : this.days) {

                     if (this.cal.get(Calendar.DAY_OF_WEEK) == this.numForName(day
                                .getNameOfDay())) {

                           TreeMap<String, Worker> jobsWithWorker = new TreeMap<String, Worker>();
                           ArrayList<String> workersWorking = new ArrayList<String>();

                           ArrayList<String> jobsInOrder = day.getJobs();
                           daysInMonth++;
                           numOfJobs.add(jobsInOrder.size());
                           for (String job : jobsInOrder) {                     
                                //SWAP 1 TEAM 5 
                        	   /*
                        	    * QUALITY CHANGES
                        	    * created jobWorkers to get the list of people who can work that certain job
                        	    */
                                ArrayList<Worker> workersForJob = jobWorkers(job, day, workersWorking);
                                
                                if (workersForJob.size() > 0) {
                                     Worker workerForJob = getWorkers(job, workersForJob);
                                     jobsWithWorker.put(job, workerForJob);
                                     workersWorking.add(workerForJob.getName());
                                     workerForJob.addWorkedJob(job);
                                } else {
                                     jobsWithWorker.put(job, new Worker("Empty",new ArrayList<Day>()));
	                                     	JOptionPane.showMessageDialog(new JFrame(),"No workers are able to work as a(n) "
	                                        + job + " on " + day.getNameOfDay());
                                     this.workerForEveryJob = false;
                                     break;
                                }

                           }
                           String date = this.cal.get(Calendar.YEAR)
                                     + "/" + String.format("%02d",(this.cal.get(Calendar.MONTH) + 1))
                                     + "/" + String.format("%02d",this.cal.get(Calendar.DAY_OF_MONTH));
                           this.schedule.put(date, jobsWithWorker);
                           break; // Breaks so it doesn't check the other days
                     }
                }
                this.cal.add(Calendar.DATE, 1);
           }
           HTMLGenerator.makeTable(daysInMonth, numOfJobs);
           // Calls itself if there aren't many days generated
           // For instance if the date it was created is the last day of the
           // month it would only makes one day of schedule.
           if (this.schedule.size() - initialSize < 2 && !this.workerForEveryJob) {
                this.calculateNextMonth();
           }

           Main.dumpConfigFile();
     }