nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

Execute UNIX Command / Shell Script Once In The Future

This is a discussion on Execute UNIX Command / Shell Script Once In The Future within the Shell scripting forums, part of the Development/Scripting category; Let's say somebody wants write priveleges on a file, and you give it to him. But what if I don't ...

Register free or login to your existing account and remove all advertisements.


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Linux answers from nixCraft.


Shell scripting You can discuss the shell scripting, request shell scripts and scripting techniques

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-27-2008, 05:49 PM
permalac's Avatar
Member
User
 
Join Date: May 2008
Location: barcelona
OS: debian,opensuse,opensolaris,centos,fedora,backtrack
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
permalac is on a distinguished road
Default Execute UNIX Command / Shell Script Once In The Future

Let's say somebody wants write priveleges on a file, and you give it to him. But what if I don't want to remember to take them back?


There is any way to execute a script in the future , 1 day as example, and only once?


Should the script be in the cron, and remove himself from cron or what?



Thanks.
Reply With Quote
  #2 (permalink)  
Old 08-27-2008, 06:47 PM
nixcraft's Avatar
Never say die
User
 
Join Date: Jan 2005
Location: BIOS
OS: RHEL
Scripting language: Bash and Python
Posts: 2,668
Thanks: 11
Thanked 240 Times in 180 Posts
Rep Power: 10
nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute nixcraft has a reputation beyond repute
Default

Quote:
There is any way to execute a script in the future , 1 day as example, and only once?
Use at / batch command to set job / script / command to be executed at a later time in future.

Code:
at 1am tomorrow
/path/to/script.sh
Save by pressing CTRL+D. This should solve your 2nd problem.

But, I'm sorry I don't get your 1st question related to privileges. Can you elaborate more about privileges related problem?
__________________
Vivek Gite
Linux Evangelist
Be proud RHEL user, and let the world know about your enterprise choices! Join RedHat user group.
Always use CODE tags for posting system output and commands!
Do you run a Linux? Let's face it, you need help
Reply With Quote
  #3 (permalink)  
Old 08-27-2008, 09:13 PM
permalac's Avatar
Member
User
 
Join Date: May 2008
Location: barcelona
OS: debian,opensuse,opensolaris,centos,fedora,backtrack
Posts: 36
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
permalac is on a distinguished road
Default

sorry, i've explained myself as hell.

What I was looking for was the "at" command.


Many thanks.
Reply With Quote
Reply

Tags
at command , batch , execute command later time


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
unix ls command raj Getting started tutorials 2 08-20-2009 04:44 PM
Binary Conversion Of Shell Script (shell script compiler) chandanperl Shell scripting 3 07-29-2008 11:22 AM
Run mv command from ftp shell script subin Shell scripting 6 05-02-2008 10:44 AM
Linux UNIX SFTP in a Shell Script Nishanthhampali Shell scripting 1 01-30-2008 02:16 PM
If file modified execute a script karabaja Shell scripting 3 11-23-2006 03:39 AM


All times are GMT +5.5. The time now is 04:40 PM.


Powered by vBulletin® Version 3.8.4 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2009 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38