Avatar of aixtutorial
aixtutorialFlag for United States of America

asked on 

This is in UNIX AIX ..Need to configure at scheduler

This is in UNIX AIX 5.3..Need to configure at scheduler..I have  a script which needs to be run every 5 mins and another script which should run every minute.I have done this in cron and its working by editing crontab -e

How can I do the same through at scheduler..where can I configure it and how can I run 2 scripts through at scheduler one running ecery minute and the other every 5 mins

I have the scripts in this location
/obiee/BI/setup/bin/script1.sh every 1 minute through at scheduler

/obiee/BI/setup/bin/script2.sh every 2 minute through at scheduler
The reason I want this to be run as at scheduler is .My cron has many other scripts which it runs  and for some reason crond goes down and we have to restart it every time..Please let me know as how to configure and use at scheduler as I dont want to get all the loadon cron


Unix OSLinux

Avatar of undefined
Last Comment
simon3270
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Hi,

"at" is meant for running one-time jobs at a later time,
thus it's not suitable for your needs.

You would need something like cron to set up an at job every minute, which sounds kind of bizarre to me.

But why should cron die?

Do you see messages in errpt?


wmp
Avatar of aixtutorial
aixtutorial
Flag of United States of America image

ASKER

wmp.

As always thanks for responding.I also wanted to learn at scheduler so thouht of working on it..
so,as what you said will I not be able to run at scheduler every minute or every 5 mins

Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

No,

it's not meant for repeated jobs, but has to be set up anew for every single job (which can then run far in the future, of course).

There's no other scheduler built into AIX, unfortunately, but there are third-party products, be it commercial or open source:

http://jobscheduler.sourceforge.net/osource_scheduler_presentation_en.htm
http://www.rocsoftware.com/pages/job_scheduling

etc.


wmp
ASKER CERTIFIED SOLUTION
Avatar of wesly_chen
wesly_chen
Flag of United States of America image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of simon3270
simon3270
Flag of United Kingdom of Great Britain and Northern Ireland image

Alternatively, your script could schedule the *next* run one minute away, then do its work for this run.
echo $0 $@ | at now + 1 minute
command1
command2
rest of commands

Open in new window


Start it off with:
  echo /full/path/to/script.sh parm1 parm2 | at now

One general problem with self-scheduling systems like this is that they might slowly drift out of time - there is always a small delay before the script actually runs, so when it sets "now + 1 minute", it might be 61 or more seconds since it last did that work - you end up running the script every 61 or more seconds rather than every 60 seconds.  You are probably safe with at, though - on the systems I have tested, it runs things exactly on the minute so won't drift.
Linux
Linux

Linux is a UNIX-like open source operating system with hundreds of distinct distributions, including: Fedora, openSUSE, Ubuntu, Debian, Slackware, Gentoo, CentOS, and Arch Linux. Linux is generally associated with web and database servers, but has become popular in many niche industries and applications.

71K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo