Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Schedule a task on hpux

Status
Not open for further replies.

25884

Programmer
Mar 12, 2001
46
0
0
AP
Hi,

How can i schedule a task on hpux?

Equivalent to windows task scheduler..

Thanks
 
For executing a task only once:
man at

For executing a task on a regular basis:
man cron
man crontab

hope this helps

 
Be aware that cron runs in it's own very limited environment and you will need to consider this in your scripting and scheduling. If it helps, I always find it useful to put the following at the beginning of a crontab, for reference purposes if I'm editing it:

Code:
#Crontab field order:
#minute (0-59),
#| hour (0-23),
#| | day of the month (1-31),
#| | | month of the year (1-12),
#| | | | day of the week (0-6 with 0=Sunday).
#| | | | | commands

cron is quite easy 'once you know how', but it's the getting to know how that takes the time. Feel free to post back with any detailed queries you may have and I'm sure we'll do our best to help. Good luck.

I want to be good, is that not enough?
 
hi,

1. Type the command "crontab -e"
to schedule the job.
2. To know about crontab command type "man crontab"
to get more details about crontab and also how to
schedule the jobs in crontab.

bye...
 
It's generally not considered good practice to directly modify the crontab using crontab -e (though I do admit to using this method myself), particularly if you are inexperienced. The 'official' best practice is to:

crontab -l > newcron.txt

cp newcron.txt crontab.safe (so that you have a backup of the 'good' (ie unedited) crontab if required)

use vi to edit newcron.txt as required

crontab newcron.txt to activate the new version.


I want to be good, is that not enough?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top