![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
| Keeping your SSH connections alive with autossh | iBot | UNIX and Linux RSS News | 0 | 05-16-2008 12:20 PM |
| Cron jobs | ajadaun | HP-UX | 5 | 10-15-2007 12:14 PM |
| cron jobs not run | robertsnoog | Linux | 4 | 02-13-2007 12:24 PM |
| Cron Jobs | Remi | SUN Solaris | 2 | 01-03-2007 07:12 PM |
| cron jobs | dozy | UNIX for Dummies Questions & Answers | 3 | 10-27-2004 09:41 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi,
I'm very new to Unix so please bear with me... Here is my requirement: I need to create a cron job to run two different scripts at 1 a.m. every day. Here's what I did: I used the "crontab -e" command and created a crontab file using the vi editor. When I exit the editor using :wq, the file is created in the /var/spool/cron/crontabs directory under my username. Typing the command "crontab -l" lists the cron jobs. Here's my problem: When I type exit and log off, the cron jobs are stopped and the crontab file with my username becomes empty!!! When I log back on and type "crontab -l", nothing is listed. Here's my question: How do I create a crontab such that the cron jobs specified remain alive even after I log off? System is Solaris 9. Thanks a lot for any advice given. Last edited by yogiB; 01-11-2007 at 06:36 AM.. |
|
||||
|
Folks,
I added the user (me ) to the "sys" group in the file /etc/group. Doing so seems to solve the problem. Now the user can log off without stopping the cron jobs. Tommy, if you are reading this, thanks for your offer to help. If you like, you could still ask the admin exactly what happened here and post his explanation for the benefit of other readers. |
|
||||
|
I dont think this is the correct approach of doing it. I think there is another way of achieving your goal.
The 'nohup' (i.e No HangUP) command keeps a job running even after the user has logged off. So, whatever command u want to keep executing, just prefix the 'nohup' command before it and also, run this command in the background. For Example nohup <Complete path of your program> & Hope that helps |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|