Schedule a shell script without crontab every Wednesday at 10 AM
HI Guys
I need one shell script to be scheduled to run one shell script to be executed automatically every Wednesday at 10 AM Without crontab and "at" command..
In addition to what vibe has already said, please also explain why you do not want to use the two utilities that are explicitly designed to do exactly what you want (i.e., at and cron).
Well I have written this script , Not sure if it can be improved
I dont have root access
What operating system are you using?
Is this script working the way you want it to work? I'm not aware of any system where the date utility has a --d option. Many systems have a date utility that doesn't even have a -d option. Does this script produce any diagnostic messages?
I don't see anything that is attempting to sleep until 10AM on Wednesday. And, if you start it before 10AM on a Wednesday, it would seem that your code might be trying to skip running on that day and instead try to wait for a week before running shell_script.
If the system is rebooted while your script is running, I don't see anything here that would attempt to restart it when the system comes back up to multi-user mode.
The cron, crontab, and at utilities are all designed to handle all of these issues. I repeat: Why do you want to reinvent the wheel when crontab and at are designed to handle all of the issues your current script seems to be lacking? Has your system's sys-admin decided that you should not be allowed to schedule jobs to run in the future by including your login name in the cron.deny file (if it is present) or by not including your login name in the cron.allow file (if it is present)?
These 2 Users Gave Thanks to Don Cragun For This Post:
Just thought I'd add to what Don Cragun said. Your OS version may be deeply tied to script you are attempting to run. A few *nix version have csh as a default shell. Most these days will not even have csh installed by default. Or it may be installed somewhere other than /bin/csh, like /usr/bin/csh. You might want to run a `which csh` to ensure its installed and the correct path is being used.
Hi all,
I would like to schedule a crontab script, which should run From 8pm Thursday to 2am Friday and it should run every 10 minutes. I have put a script like below, is it the correct one.
10 01,02,20,21,22,23,00 * * 4-5 /u01/app/test.ksh
Any other options available to schedule the same... (6 Replies)
shell=ksh,
How could I schedule tasks in shell script INSTEAD OF using the crontab -e functionality?
For example, I want a script to print "Hello World" every 10 seconds (i.e., INTERVAL = 10s) until external termination signal is triggered.
Thanks, (2 Replies)
Dear all,
I have to create a shell script which will run the job during weekday/weekend in following manner: -
There are 3 jobs
JB_1
JB_2
JB_3
These jobs changes its flag to "COMPLETED" in below 2 ways
1. These 3 jobs which runs after the completion of previous one i.e JB_1 runs and... (5 Replies)
Hi,
My script is in $home/bin/sample.sh.
I want to run the script for 3times a day,
first execution will be at 08:00 am.
second execution will be at 16:00 pm
third will be at 23:59 pm.
what will be the entry with this requirement?? (1 Reply)
All,
I'm a newbie with crontab and I need your help with schedule a cold-backup running every Sunday at 7am except 1st of the month.
Thank you so much. (2 Replies)
I have a script which shoud run after every 30 minutes.Though I know abt crontab, unfortunately I dont have access/authorization to use crontab in my terminal.
Could any one pls let me know how to schedule the script without crontab ?
Regards
Prashant:) (3 Replies)
Hi,
I need to schedule a shell script which executes another shell script along with a series of other commands.
When the inner shell script is executed it prompts for a password.....
This inner shell cannot be changed
How can I do this????
Regards,
Chaitrali. (4 Replies)
Is there a way to use cron to run a job on the 1st Wednesday of every month?? The more generic question is, "Are all of the fields in crontab AND'd together or are some OR'd?".
i.e. I had an entry in my crontab this morning as follows and I didn't expect it to run since the day of month is 20... (5 Replies)