the specified scripts was not running at specified time in crontab

the specified scripts was not running at specified time in crontab

Post by karthikey » Sat, 23 Feb 2002 17:15:24



sir,

 I am using RedHat 6.2 Linux
 Again problem with the cron.please sir I am helpless .

 I have written a script and the script contain certain lines.
I want these script to be run on specified time in the script
 I also included the starting line of script as #!/bin/sh

I tried /etc/crontab

 I wrote these lines

30 12 * * * root exec /root/lock daily
32 12 * * * root exec /root/release daily

where lock & release are the script files and they are to be run on
specified time .
but it did not worked

again I tried

30 12 * * *  exec /root/lock daily
32 12 * * *  exec /root/release daily

It did n't worked

again I tried

30 12 * * *  exec /root/lock
32 12 * * *  exec /root/release

it didn't worked

so I tried

30 12 * * *  sh /root/lock
32 12 * * *  sh /root/release

this time  a strange thing happened

that is /root/lock worked at the specified time but /root/release was
not executed .
Why please help .

on typing mail I am getting
just the first task finished and no information was given about the
second task

even I tried

30 12 * * * exec sh /root/lock
32 12 * * * exec  sh /root/release

strange thing happened

that is /root/lock worked at the specified time but /root/release was
not executed .
Why please help .

on typing mail I am getting
just the first task finished and no information was given about the
second task

everytime I am typing

       crontab /etc/crontab
       crontab -l

well it lists out the both tasks to be performed but only first task
was executed but the second task was not executed.

Please help me to run my own tasks at a specified time .HELP me

Pkease help me

 
 
 

the specified scripts was not running at specified time in crontab

Post by S C Rigl » Sat, 23 Feb 2002 22:12:58


Why not just do "crontab -e" and add these to root's
crontab instead of try to use /etc/crontab?

-S


Quote:>sir,

> I am using RedHat 6.2 Linux
> Again problem with the cron.please sir I am helpless .

> I have written a script and the script contain certain lines.
>I want these script to be run on specified time in the script
> I also included the starting line of script as #!/bin/sh

>I tried /etc/crontab

> I wrote these lines

>30 12 * * * root exec /root/lock daily
>32 12 * * * root exec /root/release daily

>where lock & release are the script files and they are to be run on
>specified time .
>but it did not worked

>again I tried

>30 12 * * *  exec /root/lock daily
>32 12 * * *  exec /root/release daily

>It did n't worked

>again I tried

>30 12 * * *  exec /root/lock
>32 12 * * *  exec /root/release

>it didn't worked

>so I tried

>30 12 * * *  sh /root/lock
>32 12 * * *  sh /root/release

>this time  a strange thing happened

>that is /root/lock worked at the specified time but /root/release was
>not executed .
>Why please help .

>on typing mail I am getting
>just the first task finished and no information was given about the
>second task

>even I tried

>30 12 * * * exec sh /root/lock
>32 12 * * * exec  sh /root/release

>strange thing happened

>that is /root/lock worked at the specified time but /root/release was
>not executed .
>Why please help .

>on typing mail I am getting
>just the first task finished and no information was given about the
>second task

>everytime I am typing

>       crontab /etc/crontab
>       crontab -l

>well it lists out the both tasks to be performed but only first task
>was executed but the second task was not executed.

>Please help me to run my own tasks at a specified time .HELP me

>Pkease help me


 
 
 

the specified scripts was not running at specified time in crontab

Post by Joe » Sun, 24 Feb 2002 03:00:17



> sir,

>  I am using RedHat 6.2 Linux
>  Again problem with the cron.please sir I am helpless .

>  I have written a script and the script contain certain lines.
> I want these script to be run on specified time in the script
>  I also included the starting line of script as #!/bin/sh

> I tried /etc/crontab

>  I wrote these lines

> 30 12 * * * root exec /root/lock daily
> 32 12 * * * root exec /root/release daily

...

Correct form would be:

30 12 * * * root /root/lock daily
32 12 * * * root /root/release daily

Make sure both scripts are executable.
Check /var/log/cron and maybe /var/log/messages