Start program in background (or start crontab ahead of time)

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Start program in background (or start crontab ahead of time)
# 1  
Old 07-21-2009
Start program in background (or start crontab ahead of time)


I'm working on a script that will add a user, create some configfiles, and add a crontab for the user.

The crontab looks like the following:
@reboot /home/user/program config.conf &

I would like for this process to start at the end of my script under the corresponding username by either running the crontab ahead of time, or by making sure that the program is started as if the user was running it himself.

How do I do that?

The script already does what i want, except for running the program.

---------- Post updated at 12:06 PM ---------- Previous update was at 11:52 AM ----------

Never mind.. sudo was the answer.. Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to start jobs manually from Crontab

Hello - I have about 7 jobs listed in my crontab. They run automatically everyday. However I am wondering how to start them manually? My system is SunOS 5.10 Jobs are listed in this fashion: 41 00 * * 1-5 /system/volms/.vbc/startmeup 01 44 * * 0-6 /system/volms/.vbc/kill (space)... (7 Replies)
Discussion started by: DallasT
7 Replies

2. Shell Programming and Scripting

How to calculate time difference between start and end time of a process!

Hello All, I have a problem calculating the time difference between start and end timings...! the timings are given by 24hr format.. Start Date : 08/05/10 12:55 End Date : 08/09/10 06:50 above values are in mm/dd/yy hh:mm format. Now the thing is, 7th(08/07/10) and... (16 Replies)
Discussion started by: smarty86
16 Replies

3. Homework & Coursework Questions

little start c program

hello, i wil make the next mission: give how many chambers in a constant number. use an array which chamber is free and count how many chamber there are free. make also something to test I don't now how to start. I need an little example so i can make the mission thank you (10 Replies)
Discussion started by: wouter88
10 Replies

4. Linux

Process start time not showing correct time

Process start time is not showing the correct time: I had started a process on Jun 17th at 23:30:00. Next day morning when I run the command "ps -ef | grep mq", the process is showing the start date of Jun 17th but the start time is 00:16:41 Day/Date is setup correctly on the server. It... (2 Replies)
Discussion started by: hemangjani
2 Replies

5. Programming

How to start a process in linux using C program??

I have a set of attributes such as group id,group name,etc related to a linux process. Iwant to know how to start a process in linux using C program.Plz do help me. (3 Replies)
Discussion started by: vigneshinbox
3 Replies

6. Shell Programming and Scripting

Start and End times of background processes

Hi I'm running 4 jobs in the background and I need to write the start and end times to a log file. I know there's probably a simple way to do this but, I can't think of it. I've used nohup <script name> & but, that doesn't record the times. Is there a way to get the start and end times of a... (2 Replies)
Discussion started by: stonemonolith
2 Replies

7. Shell Programming and Scripting

start a program with other user's permission

I have some of programs in unix system which are to started with one_user say "xxxx". I have sudo permission if i start these programs with sudo it shows root permission. But i want these programs permession should be "xxxx". I tried "su user_name -c Program_name" but it is not... (3 Replies)
Discussion started by: srikanthus2002
3 Replies

8. Shell Programming and Scripting

Start time/end time and status of crontab job

Is there anyway to get the start time and end time / status of a crontab job which was just completed? Of course, we know the start time of the crontab job since we are scheduling. But I would like to know process start and time recorded somewhere or can be fetched from a command like 'ps'. ... (3 Replies)
Discussion started by: thambi
3 Replies

9. UNIX for Dummies Questions & Answers

How do I start a program when I start my Computer?

I'm running MAC OS X and I'm wondering how I start 'nixey programs (not normal apps) on startup? Things like the dnet client and hxd Hotline Server. Anyone know? (1 Reply)
Discussion started by: l008com
1 Replies
Login or Register to Ask a Question
KEP_RELOAD(1)						      General Commands Manual						     KEP_RELOAD(1)

kep_reload - Update Predict's Keplerian elements SYNOPSIS
kep_reload DESCRIPTION
KEP_RELOAD is a simple utility that forces an immediate reload of PREDICT's Keplerian database through a socket connection while PREDICT is running in server mode. It is especially useful in environments where PREDICT runs continuously, and periodic Keplerian element updates are made outside of PREDICT, such as through scripts run through a crontab. The "kepupdate" script found in this directory is an example of a Keplerian element update script that can be run on an automated basis through a crontab. It is designed to be placed in your home directory under a subdirectory called "cronjobs". It downloads Keplerian orbital data from using the HTTP protocol. (The "wget" utility, available from the Free Software Foundation, is required, and is included in many Linux distrubutions.) Type crontab -e to edit your crontab. Simply add the following entry: 0 8 * * * kepupdate and your orbital database will update each morning at 8:00 AM (provided you have a network connection at that time). See the crontab man page for more information on editing your crontab. AUTHOR
This man page was written by A. Maitland Bottoms, AA4HS, for Debian GNU/Linux. 31 August 2003 KEP_RELOAD(1)

Featured Tech Videos