How Do I Set a Task to Happen in the Future?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers How Do I Set a Task to Happen in the Future?
# 1  
Old 08-09-2006
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  
Old 08-09-2006
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  
Old 08-09-2006
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.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

When downloading a webpage by curl, what happen?

Hello, when im downloading an webpage from command line (CLI) by curl or wget the target website is loaded like i load it from browser? meaning target server connect to database and render data from mysql? Or only static content is downloaded? (2 Replies)
Discussion started by: postcd
2 Replies

2. AIX

How does ITIL processing happen in AIX?

How does ITIL process is implemened in AIX? (6 Replies)
Discussion started by: AIXlearner
6 Replies

3. Programming

what would happen if a process wrote to its own stdin?

what would happen if a process wrote to its own stdin? #include<unistd.h> #include<fcntl.h> int main() { if((write(STDIN_FILENO,"arrgh!",6))==-1) { perror("error writing to file"); } } output: $ gcc temp.c $ ./a.out arrgh!$ (9 Replies)
Discussion started by: c_d
9 Replies

4. Shell Programming and Scripting

Parse an XML task list to create each task.xml file

I have an task definition listing xml file that contains a list of tasks such as <TASKLIST <TASK definition="Completion date" id="Taskname1" Some other <CODE name="Code12" <Parameter pname="Dog" input="5.6" units="feet" etc /Parameter> <Parameter... (3 Replies)
Discussion started by: MissI
3 Replies

5. Shell Programming and Scripting

comment and Uncomment single task out of multiple task

I have a file contains TASK gsnmpproxy { CommandLine = $SMCHOME/bin/gsnmpProxy.exe } TASK gsnmpdbgui { CommandLine = $SMCHOME/bin/gsnmpdbgui.exe I would like to comment and than uncomment specific task eg TASK gsnmpproxy Pls suggest how to do in shell script (9 Replies)
Discussion started by: madhusmita
9 Replies

6. UNIX for Advanced & Expert Users

Unix ID deleted - What happen to process

I have an unix id (AIX system) which is used to run a couple of processes. They also write some log files into a file system (that is not in the home directory of the user id, but in different location). One bad day, the id was deleted accidentally. But the home directory, files and everything... (1 Reply)
Discussion started by: cmgreat
1 Replies

7. UNIX for Dummies Questions & Answers

What would happen if. . .

Hi, Could someone please tell me what would happen if the following were entered into the command line: rm -i /books/*.* rm /books/* Many thanks! (3 Replies)
Discussion started by: crispy
3 Replies

8. Programming

Any one can tell me how this happen?

The #1 Online Store for Louis Vuitton Replicas is: http://www.opichina.com.cn. We offer Louis Vuitton Replicas and more! Whatever you call it: LV Bags, LV Replicas, Louis Vuitton Fake, Louis Vuitton Knockoffs, Louis Vuitton Bag, Louis Vuitton Purse, Louis Vuitton Wallet, Louis Vuitton Shoes,... (10 Replies)
Discussion started by: jiangyanna
10 Replies

9. UNIX for Dummies Questions & Answers

what happen when changing Hostname?

I 'm using RH 7.2 Genome in the Network Configuration I change therer are two places one for static hostname for my machine and in DNS hostname I don't know what happen when restarting my PC when connecting using dialer I can't browse the Internet also I can't use sendmail .......Server timeout... (2 Replies)
Discussion started by: atiato
2 Replies
Login or Register to Ask a Question