Did you know that OEM has a built in interface for executing simple ad-hoc queries and recording the results?
Here is how I set up a recurring query to find the number of user logins every 15 minutes and record the data.
1) Navigate to a database instance in OEM
2) Select the Related Links -> User Defined Metrics link from the bottom of the Database Instance Home tab.
3) Select the Create button to create a new User Defined Metric
a. Enter the Metric Name