The simplest way I would do is, I would schedule a procedure on a daily basis and implement the condition in the procedure. If the condition is not met the procedure will not do anything otherwise it will do what its supposed to do.
Or you can try creating a event-based job. Examples of Using the Scheduler
Creating a job that should run every night at a fixed time is fairly easy. Have you checked the documentation?
By "log it off" you mean kill the user inactive sessions? There are cleaner way to end long inactive client sessions:
- Timeout implemented in the application itself
- Dead Client Detection (DCD)
See the MOS note 206007.1 :
How To Automate Cleanup Of Dead Connections And INACTIVE Sessions (Doc ID 206007.1)
Will the below help?
job_name => 'TEST_JOB',
job_type => 'PLSQL_BLOCK',
job_action => 'begin /* some process code */ commit; end;',
number_of_arguments => 0,
start_date => sysdate +1/24/59, -- sysdate + 1 minute
job_class => 'ADMIN', -- Priority Group
enabled => TRUE,
auto_drop => TRUE,
comments => 'Testrun');