Showing posts with label bash. Show all posts
Showing posts with label bash. Show all posts

Saturday, August 25, 2007

Howto use the "screen" utility to keep commands running even when you logout

#screen
#command to run in background
CTRL-a DD ( detach and logout)

To reattach to an existing detached session
#screen -R

Tuesday, July 31, 2007

Need to schedule a job for the last day of the month?

Lets say you need to run a command on the last day of the month. The corn system needs you to provide the day of the month ( like 28,29,30,31) . Since the last day of the month is not a fixed date, cron comes short on this requirement.

Fortunately, these is a easy way to work around this. Shell to the rescue :

00 09 * * * [ `date -d tomorrow +'%d'` = '01' ]&&/command/to/run

About Me

California, United States