Who is doing the checking? If you want to send an email when a room is
empty you need to run web2py from command prompt with cron to check if
the end_date has gone.
When designing the database its maybe not a good idea to create a own
tables for every buildning. Instead create a rooms table:
db.define_table('rooms'
Field('building'),
Field('roomname'),
Field('owner'))
Kenneth
Hi! I'm currently building an app where I need accomplish this:
When a booking is made I specify the booking start date time and the
booking end date time. How could I check periodically when a booking
has ended (according to end date)??
For example:
db.define_table('building1_rooms'
Field('roomname'),
Field('owner'))
db.define_table('building1_bookings',
Field('requester'),
Field('startdate'),
Field('enddate'),
Field('validated','boolean'))
so what I need is this, a booking is created, an admin validates the
booking, room.owner takes building1_bookings.requester, and when
server date == enddate, room.owner should be 'Free'