i have written a java program of scraping and i want to automate it to run the scraping everyday at a specific time. 

this is the code 

```
private static class DateObject{

        private Double taxes;
        private Double price;
        private Double htPrice;

        public DateObject(Double price, Double htPrice, Double taxes){
            this.taxes = taxes;
            this.price = price;
            this.htPrice = htPrice;
        }

        public Double getTaxes() {
            return taxes;
        }

        public Double getPrice() {
            return price;
        }

        public Double getHtPrice() {
            return htPrice;
        }
    }

    public static void main(String[] args) {

        Map<String, DateObject> prices = new TreeMap<String, DateObject>();
        File f = new File(System.getProperty("user.home") + "\\Desktop\\Test.xls");

        WritableWorkbook myexcel = null;

        try {

            myexcel = Workbook.createWorkbook(f);
            WritableSheet mysheet = myexcel.createSheet("AirFrance ", 0);

            Response response = Jsoup
                    .connect("http://www.airfrance.fr/vols/paris+tunis")
                    .userAgent("Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36")
                    .method(Method.GET)
                    .timeout(2000)
                    .execute();

            Document doc = Jsoup
                    .connect("http://www.airfrance.fr/FR/fr/local/vols/getInstantFlexNewCalendar.do?idMonth=10&itineraryNumber=1")
                    .cookies(response.cookies())
                    .timeout(2000)
                    .userAgent("Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.82 Safari/537.36")
                    .referrer("http://www.airfrance.fr/vols/paris+tunis").get();

            JSONObject obj = (JSONObject) new JSONParser().parse(doc.text());

            JSONArray dates = (JSONArray) obj.get("days");

            JSONObject dateObject;

            for(Object o : dates){
                if ( o instanceof JSONObject ) {
                    dateObject = ((JSONObject)o);
                    prices.put(dateObject.get("dallasDate").toString(), new DateObject((Double)dateObject.get("price"), (Double)dateObject.get("HTprice"), (Double)dateObject.get("taxes")));
                }
            }

            addLabel(mysheet, 0, 0, "Date");
            addLabel(mysheet, 1, 0, "Prix [€]");
            addLabel(mysheet, 2, 0, "PrixHt [€]");
            addLabel(mysheet, 3, 0, "Taxes [€]");

            int rowIndex = 1;
            DateObject date;

            for (String key : prices.keySet()) {
                date = prices.get(key);
                addLabel(mysheet, 0, rowIndex, key);
                addLabel(mysheet, 1, rowIndex, ""+date.getPrice());
                addLabel(mysheet, 2, rowIndex, ""+date.getHtPrice());
                addLabel(mysheet, 3, rowIndex, ""+date.getTaxes());
                rowIndex++;
            }

        myexcel.write();

        System.out.println("Scraping finished without errors.");

        } catch (IOException e) {
            e.printStackTrace();
        } catch (ParseException e) {
            e.printStackTrace();
        } catch (WriteException e) {
            e.printStackTrace();
        } finally {
            try {
                myexcel.close();
            } catch (WriteException e) {
                e.printStackTrace();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }

    private static void addLabel(WritableSheet sheet, int column, int row, String s)
            throws WriteException, RowsExceededException {
        Label label;
        label = new Label(column, row, s);
        sheet.addCell(label);
    }

```

And i want also to receive an error mail if scrapping went wrong. Any help please