# Event Scheduler

**URL:** <https://forum.phpvms.net/t/event-scheduler/2419>\
**Category:** phpVMS Legacy Support (v2/v5)\
**Created:** [April 15, 2010, 7:13am UTC](https://forum.phpvms.net/t/event-scheduler/2419 "2010-04-15T07:13:06Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alex](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/a/db5fbb/32.png) [@Alex](https://forum.phpvms.net/u/Alex)\
**Post date:** [April 15, 2010, 7:13am UTC](https://forum.phpvms.net/t/event-scheduler/2419/1 "2010-04-15T07:13:06Z")

</div>

In relation to Schedules, would it be possible to have an automated schedule randomizer,which you could list certain routes to be randomized and then say every three hours the times change unless bid on?

so although the route stays the same it rotates over 24hrs to enable more people from accross the globe to select a more appropriate timed schedule?

thoughts or comments?

---

<div class="post-metadata">

**Author:** ![nabeel](https://forum.phpvms.net/user_avatar/forum.phpvms.net/nabeel/32/2971_2.png) [@nabeel](https://forum.phpvms.net/u/nabeel)\
**Post date:** [April 15, 2010, 1:55pm UTC](https://forum.phpvms.net/t/event-scheduler/2419/2 "2010-04-15T13:55:07Z")

</div>

If you enter the start times properly, you can easily pick out the schedules which are around that time period. But yes, what you want to do is easily possible as well.

---

<div class="post-metadata">

**Author:** ![Alex](https://forum.phpvms.net/letter_avatar_proxy/v4/letter/a/db5fbb/32.png) [@Alex](https://forum.phpvms.net/u/Alex)\
**Post date:** [April 15, 2010, 5:44pm UTC](https://forum.phpvms.net/t/event-scheduler/2419/3 "2010-04-15T17:44:26Z")

</div>

My response was going to be, in the schedule search, i would like to add a search for all flights departing in less than one hour.

Is there a quick code snippet available?

i managed to get to here but need the scripty bit to search

```
<div id="time">

	<p>Select Nearest Departure Time :</p>

	<select id="type" name="type">

		<option value="less">Less Than</option>

	</select>
	<label>
	<select name="time" id="time2">
	  <option>1 hour</option>
	  <option>5 hours</option>
	  <option>10 hours</option>
	  <option>24 hours</option>
    </select>
  </label>
	<input type="submit" name="submit" value="Find Flights" />

```

---

<div class="post-metadata">

**Author:** ![nabeel](https://forum.phpvms.net/user_avatar/forum.phpvms.net/nabeel/32/2971_2.png) [@nabeel](https://forum.phpvms.net/u/nabeel)\
**Post date:** [April 15, 2010, 11:55pm UTC](https://forum.phpvms.net/t/event-scheduler/2419/4 "2010-04-15T23:55:02Z")

</div>

You’d have to find the query, I don’t remember it off the top of my head but it’ would be something like:

```
// This query might need some work, something like this though
$where = array("DATE_SUB(NOW(), 'INTERVAL 60 MINUTE') <= s.deptime");
$schedules_list = SchedulesData::findSchedules($where);

```

And that will return the list. The documentation has the details on how to then loop through $schedules\_list
