- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Scheduling a cron Job
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-16-2008 05:10 AM
тАО12-16-2008 05:10 AM
Scheduling a cron Job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-16-2008 05:48 AM
тАО12-16-2008 05:48 AM
Re: Scheduling a cron Job
what really you wanna do? not clear
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-16-2008 05:54 AM
тАО12-16-2008 05:54 AM
Re: Scheduling a cron Job
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-16-2008 05:56 AM
тАО12-16-2008 05:56 AM
Re: Scheduling a cron Job
Write a custom script to deal with the problem.
Then schedule it in cron.
Want something more specific? Give us something more specific.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-16-2008 06:00 AM
тАО12-16-2008 06:00 AM
Re: Scheduling a cron Job
find . -print |cpio -pdumxl /target_dir
Put those lines in a script, then schedule the script with cron.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-16-2008 06:03 AM
тАО12-16-2008 06:03 AM
Re: Scheduling a cron Job
I have a directory /data/sm/ and under this reides several files e.g. /data/sm/file1 etc and I have to schedule acrom job to copy those files on daily basis to the directoy /copy/sm/
which should run daily.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-18-2008 03:47 AM
тАО12-18-2008 03:47 AM
Re: Scheduling a cron Job
Add this in your script and put the crontab entry for the same
cp -pr /data/sm/* /copy/sm/.
It will copy the files and directories whatever under /data/sm/ to /copy/sm/
Hope you are familiar with crontab.
If you want more specfic.... reply
Regards,
Jenith Christopher.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-18-2008 04:56 AM
тАО12-18-2008 04:56 AM
Re: Scheduling a cron Job
Does the files have the potential to be named the same as a file the day before?
If you cron it and the files share names they will be overwritten.
With that said,
-------------------
#!/bin/sh
# copy the files recursively and preserve file flags (permissions and such)
cp -pr /data/sm/* /copy/sm/
-------------------
and in crontab just write:
0 0 * * * /path/to/script
You can chage 0 0 to match the time you want to run it, the first one is hour and the other one is minute. That line will make it go off at 00:00 all days of all months. Make sure you chmod +x the script.
Best regards
Fredrik Eriksson