Jump to content


Click the link below to see the new game I'm developing!


Photo
- - - - -

Batch queue from a cron


4 replies to this topic

#1 gkwalton

gkwalton

    Expert

  • Members
  • PipPipPipPip
  • 106 posts
  • Gender:Male

Posted 23 June 2004 - 08:26 PM

Hello,

I am having problems running a batch job from a cron job.

I have a script that will fire up a PROIV session and execute a custom batch run that will run in a batch queue. When I execute the script from the command line the job runs fine, but when the same script is executed from a cron job it does not work. I can see the job in the batch queue monitor but it does not actually run the job.

I have been told that the pro executable must be in the $PATH of the user. What user is used when running a cron job? I assumed it would be root but I am not so sure.

Any ideas would be appreciated.

Thanks,
George Jnr.

#2 Joseph Bove

Joseph Bove

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 756 posts
  • Gender:Male
  • Location:Ramsey, United States

Posted 23 June 2004 - 09:15 PM

George,

Definitely root.

I'd recommend redirecting standard out and error so that you can see what the errors are

Regards,

Joseph

#3 Surajit

Surajit

    Expert

  • Members
  • PipPipPipPip
  • 132 posts
  • Gender:Male
  • Location:Land of Smiles :-)

Posted 24 June 2004 - 04:44 AM

Hi George,

I have the same experience with you, it is the .profile that make you able to execute the script when you login to system and execute it manually.

Copy the parameters setting statements from .profile into your cron script, and try again, it should work.

Surajit.

Edited by Surajit, 24 June 2004 - 04:48 AM.


#4 Chris Mackenzie

Chris Mackenzie

    ProIV Guru

  • Members
  • PipPipPipPipPip
  • 372 posts
  • Gender:Male
  • Location:Bristol, United Kingdom

Posted 24 June 2004 - 07:38 AM

Copy the parameters setting statements from .profile into your cron script, and try again, it should work.

Or execute the .profile from the cron so you don't have to make future changes twice.



What user is used when running a cron job? I assumed it would be root but I am not so sure.



Definitely root.


It is possible for any user to have their own crontab.
The content and views expressed in this message are those
of the poster and do not represent those of any organisation.

#5 gkwalton

gkwalton

    Expert

  • Members
  • PipPipPipPip
  • 106 posts
  • Gender:Male

Posted 24 June 2004 - 01:27 PM

Surajit,

That appears to have worked like a charm.

Thanks a lot!

George.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Click the link below to see the new game I'm developing!