Exemplo n.º 1
0
function cron()
{
    try {
        connectDB();
        saveStations();
        savePrices();
        getInfo(true);
    } catch (Exception $e) {
        getInfo(false);
    }
}
Exemplo n.º 2
0
function saveTodayPrices()
{
    $tomorrow = new DateTime('tomorrow');
    savePrices($tomorrow->format("Y"), $tomorrow->format("m"), $tomorrow->format("d"));
}