The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Unix ID deleted - What happen to process cmgreat UNIX for Advanced & Expert Users 1 04-03-2008 05:18 AM
What happen in registers Internaly using as in csl() function brain_full High Level Programming 3 03-15-2007 09:47 AM
What would happen if. . . crispy UNIX for Dummies Questions & Answers 3 05-12-2005 01:43 PM
Any one can tell me how this happen? jiangyanna High Level Programming 10 06-13-2003 05:24 AM
what happen when changing Hostname? atiato UNIX for Dummies Questions & Answers 2 02-14-2002 08:20 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-09-2006
Slick Slick is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 17
How Do I Set a Task to Happen in the Future?

Is it possible to set a task to happen in the future? Say I want to log-off only after 10 hours of being logged on with out doing any activity in between?
  #2 (permalink)  
Old 08-09-2006
Corona688 Corona688 is online now
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,933
That one is tricky because you need some way to find out how long you've been inactive, which only the shell can really know for sure.
  #3 (permalink)  
Old 08-09-2006
rhfrommn rhfrommn is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2003
Location: Minnesota
Posts: 422
The at command is used to schedule something in the future 1 time, while cron is used to schedule something for repeated running at certain intervals. Check the manpages for those to see the syntax/usage.

However, as Corona688 mentioned your problem is to determine the idle time. You'd probably have to write a script that uses w or who or some such command to check the idle time for your userid then log you off if it exceeds a threshhold. Once you've got that script use cron to run it every 5 minutes or whatever you'd like. Doing your example isn't as simple as just running 1 command.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 06:13 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0