www/crontasks.php

Sun, 10 Feb 2019 16:36:25 +0100

author
Michiel Broek <mbroek@mbse.eu>
date
Sun, 10 Feb 2019 16:36:25 +0100
changeset 259
ffab9ba3f532
parent 257
62e294ab94f5
child 294
1e09d1d102a8
permissions
-rw-r--r--

Ignore mash steps above 75 degrees for estimate_fg calculation. If multiple yeasts for primary fermentation, ise the highest attenuation because that yeast usually wins.

257
62e294ab94f5 Version 0.0.6. Added a crontask that adjusts the stage of packaged beer depending on the days passed packaging
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
1 <?php
62e294ab94f5 Version 0.0.6. Added a crontask that adjusts the stage of packaged beer depending on the days passed packaging
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
2
62e294ab94f5 Version 0.0.6. Added a crontask that adjusts the stage of packaged beer depending on the days passed packaging
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
3 require_once('config.php');
62e294ab94f5 Version 0.0.6. Added a crontask that adjusts the stage of packaged beer depending on the days passed packaging
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
4
62e294ab94f5 Version 0.0.6. Added a crontask that adjusts the stage of packaged beer depending on the days passed packaging
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
5 $mysqli = new mysqli(DBASE_HOST,DBASE_USER,DBASE_PASS,DBASE_NAME);
62e294ab94f5 Version 0.0.6. Added a crontask that adjusts the stage of packaged beer depending on the days passed packaging
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
6 $query = "UPDATE products SET stage=7 WHERE stage = 6 AND DATEDIFF(CURDATE(), package_date) > 0";
62e294ab94f5 Version 0.0.6. Added a crontask that adjusts the stage of packaged beer depending on the days passed packaging
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
7 $result = $mysqli->query($query);
62e294ab94f5 Version 0.0.6. Added a crontask that adjusts the stage of packaged beer depending on the days passed packaging
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
8
62e294ab94f5 Version 0.0.6. Added a crontask that adjusts the stage of packaged beer depending on the days passed packaging
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
9 $query = "UPDATE products SET stage=8 WHERE stage = 7 AND DATEDIFF(CURDATE(), package_date) > 13";
62e294ab94f5 Version 0.0.6. Added a crontask that adjusts the stage of packaged beer depending on the days passed packaging
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
10 $result = $mysqli->query($query);
62e294ab94f5 Version 0.0.6. Added a crontask that adjusts the stage of packaged beer depending on the days passed packaging
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
11
62e294ab94f5 Version 0.0.6. Added a crontask that adjusts the stage of packaged beer depending on the days passed packaging
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
12 $query = "UPDATE products SET stage=9 WHERE stage = 8 AND DATEDIFF(CURDATE(), package_date) > 41";
62e294ab94f5 Version 0.0.6. Added a crontask that adjusts the stage of packaged beer depending on the days passed packaging
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
13 $result = $mysqli->query($query);
62e294ab94f5 Version 0.0.6. Added a crontask that adjusts the stage of packaged beer depending on the days passed packaging
Michiel Broek <mbroek@mbse.eu>
parents:
diff changeset
14

mercurial