cronjob process not work


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers cronjob process not work
# 1  
Old 11-01-2001
cronjob process not work

Hi all,

I having a very unknown problem. I set my process to cronjob but it does not work at all!!!!!!No error detected, just nothing....


Cron:
15 * * * * /process/directory/path/$processname.sh

Script($processname.sh):
nohup $process &



Please help. I have no idea at all.
Smilie
Thanks!
# 2  
Old 11-02-2001
Hi Clemot,
Does your script name/path actually have a $ in it? That could be an issue, I have never tried it but I would think your system would try to interpret $processname.sh as a variable.
If that is not the case and you can run the script manually, I suggest modifying your crontab to something like this:

15 * * * * /process/directory/path/$processname.sh >> /path/to/log/logfile.log 2>&1

This will create a logfile in what ever path you specify and echo both STDOUT and STDERR to the log. This should give you some clues as to why it is not working. You just have to wait until 15 after the next hour to find out, unless you want to change the time to run closer to when you are working on it.
TioTony
# 3  
Old 11-02-2001
I just had a similar problem on SuSE Linux. The man page makes reference to an allow and deny file. On my system they are located at <b>/var/spool/cron</b> The deny file is supposed to deny only those who can't use cron and allow all others. I found that when I deleted the deny and made an allow file with root in it that I was able to run cron from the root. For a large amount of users I think this solution is very poor, but if it's just for a PC try it out.
# 4  
Old 11-05-2001
From the man page on Solaris 8:

<b> Users: Access to crontab is denied:

o if /etc/cron.d/cron.allow exists and the user's name
is not in it.

o if /etc/cron.d/cron.allow does not exist and user's
name is in /etc/cron.d/cron.deny.

o if neither file exists.

Note that the rules for allow and deny apply to root only if
the allow/deny files exist.

The allow/deny files consist of one user name per line.</b>

(On my SuSE box the location is <b>/var/spool/cron</b> but the man page reads pretty much the same).

According to this my SuSE box should have only denied the users in the deny file (guest and nobody). Even root on my SuSE box could not use cron without being placed into allow. I'm not sure why but I have never had this problem on Solaris.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to stop cronjob automatically after cron process get completed?

Hi , I have scheduled the script using cron between 25-31 of the month. My script will trigger the ETL job once file is available in Windows path between these days(every 2 hours between 26 - 30 of every month ). So my question : "if the ETL job completes cron should stop the running the... (5 Replies)
Discussion started by: Jaganjag
5 Replies

2. IP Networking

Discussion at work, would a router work pluging a cable in wan1 and lan1?

hi all. and sorry for the random question, but this sparkled a raging flame-war at work and i want more points of view situation a router, with linux of some sort, dhcp client requesting for ip in wan1 (as usual with wan ports) dhcp server listening in lan1, and assigning ip (as usual... (9 Replies)
Discussion started by: broli
9 Replies

3. Programming

Cannot get dbx to work correctly with a running process

Hi everyone, I've been struggling with this for a few weeks now. I'm trying to debug a running process with dbx on an AIX box. The command I'm using is 'dbx -a <pid> core' There is a function I can perform in my application that crashes this process, but it does not show up as crashed in... (0 Replies)
Discussion started by: ctote
0 Replies

4. UNIX for Dummies Questions & Answers

how to cancel a cronjob if the cronjob still running

hi everyone I'm newbie in this forum hope I can get some help here :) I have a command in crontab that executed every 1 minute sometime this command need more than 1 minute to finish the problem is, the crontab execute this command although it's not finish processing yet and causing the system... (7 Replies)
Discussion started by: 2j4h
7 Replies

5. Shell Programming and Scripting

Rerun a cronjob if it doesn't work at first.

I want to add a line to the script that searches for a file. If the file does not exist, I need to kill the cronjob and run it again in one hour. I am running the program and 2 am and 2pm. I would want the job to run again at 3am and 3pm respectively. How could I do this and still keep the cronjob... (1 Reply)
Discussion started by: libertyforall
1 Replies

6. UNIX for Advanced & Expert Users

how to delay a process getting killed before it completes its work

The problem i am encountering is the process is getting killed before it dispalys the details.The details are displayed using printf.I created a new buffer for printing the details using setvbuf function call instead of output buffer.This is not working.The thing is,killing of the process must be... (1 Reply)
Discussion started by: cijkmysj
1 Replies

7. UNIX for Dummies Questions & Answers

how can i know that cronjob work status

how can i know that cronjob work status(like completed or throws any error) (2 Replies)
Discussion started by: ss4u
2 Replies

8. UNIX for Advanced & Expert Users

When kill doesnt work, how to kill a process ?

Hi All, I am unable to kill a process using kill command. I am using HP-UX system. I have tried with kill -9 and i have root privilages. How can i terminate this daemon ? ? ? Regards, Vijay Hegde (3 Replies)
Discussion started by: VijayHegde
3 Replies

9. UNIX for Dummies Questions & Answers

If I want to separate my work to child process,what should I do?

I know that the fork() can use for create a child process as following pid_t child_pid; int child_status; child_pid = fork(); switch (child_pid) { case -1: perror("fork"); exit(1); case 0: printf("hello world\n"); exit(0); default: ... (2 Replies)
Discussion started by: robocup
2 Replies

10. UNIX for Dummies Questions & Answers

Repquota doesn't work as Cronjob?!?

Hello: I'm trying to run repquota -ag > /home/usersdir/repquota.txt as a daily cronjob at midnight, but the file always ends up blank. I even tried writing a quick Perl script to e-mail me what running that command outputs, and it's nothing. Can root run repquota as a cronjob? Do I have... (1 Reply)
Discussion started by: b416
1 Replies
Login or Register to Ask a Question