Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- rule "Utwórz link meteogramu 00"
- when
- Time cron "0 50 6 ? * * *" // codziennie o 0610
- then
- val String currentDate = String::format( "20%1$ty%1$tm%1$td", new java.util.Date )
- val link = "http://new.meteo.pl/um/metco/mgram_pict.php?ntype=0u&fdate=" + currentDate + "00" + "&row=342&col=208&lang=pl"
- postUpdate(MeteogramyLink, link)
- logInfo("Meteo", "Uaktualniono link do meteogramu " + currentDate + "00")
- end
- rule "Utwórz link meteogramu 06"
- when
- Time cron "0 50 12 ? * * *" // codziennie o 1200
- then
- val String currentDate = String::format( "20%1$ty%1$tm%1$td", new java.util.Date )
- val link = "http://new.meteo.pl/um/metco/mgram_pict.php?ntype=0u&fdate=" + currentDate + "06" + "&row=342&col=208&lang=pl"
- postUpdate(MeteogramyLink, link)
- logInfo("Meteo", "Uaktualniono link do meteogramu " + currentDate + "06")
- end
- rule "Utwórz link meteogramu 12"
- when
- Time cron "0 50 19 ? * * *" // codziennie o 1910
- then
- val String currentDate = String::format( "20%1$ty%1$tm%1$td", new java.util.Date )
- val link = "http://new.meteo.pl/um/metco/mgram_pict.php?ntype=0u&fdate=" + currentDate + "12" + "&row=342&col=208&lang=pl"
- postUpdate(MeteogramyLink, link)
- logInfo("Meteo", "Uaktualniono link do meteogramu " + currentDate + "12")
- end
- rule "Utwórz link meteogramu 18"
- when
- Time cron "0 59 23 ? * * *" // codziennie o 2359
- then
- val String currentDate = String::format( "20%1$ty%1$tm%1$td", new java.util.Date )
- val link = "http://new.meteo.pl/um/metco/mgram_pict.php?ntype=0u&fdate=" + currentDate + "18" + "&row=342&col=208&lang=pl"
- postUpdate(MeteogramyLink, link)
- logInfo("Meteo", "Uaktualniono link do meteogramu " + currentDate + "18")
- end
Add Comment
Please, Sign In to add comment