[SOLVED] CRON not working ; any other way to schedule a script ?
AIXThis forum is for the discussion of IBM AIX.
eserver and other IBM related questions are also on topic.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
CRON not working ; any other way to schedule a script ?
Hi,
I'm using AIX Version 6.1
I had setup a CRON to run a particular script daily at 23:05, but unfortunately its not running from CRON.
Is there any other way to schedule a script to run daily at 23:05 (System Time) like using an indefinite loop and sleep command in existing script and running it in background ?
If yes, can you please provide me the code snipet of the same as I am unable to figure out what exactly needs to be put in.
I'd look first into why cron isn't working for your script. Are the permissions on the script set correctly? Are you using full path to your script in the cron definition? Does your script work if executed manually as the user intended to run the script? The best option to run a script automatically is by using cron in my opinion, so troubleshoot that first would be my advice.
This is the crontab -e entry : 5 23 * * * /var/mqm/tmp/pso/ftp_cron.sh
chmod 777 permission is given to the script.
I had raised a ticket with IBM & they said that there is some issue with OS & some patching needs to be done to overcome this.
So, basically CRON won't work, no matter what.
Hence, how do I schedule a job without using CRON ?
Very strange that cron wouldn't work no matter what but if the guys from IBM said that...
You could look into the 'at' command to 'pre-program' a job to run. But you'll need to find a way (scripting for example) to automate it since that's not possible with standard 'at' command.
Yes, it is working perfectly when run manually.
There is a OS problem with CRON, as confirmed by IBM. So, there is no problem with the script or the CRON command as such.
Is there anyother way to schedule it by adding a loop or something in the script & running it in background ?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.