Write a cron script


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Write a cron script
# 1  
Old 10-22-2006
Write a cron script

Hi all techie geniuses,

I am new to the tehc field and need some help badly.
I need a ksh script. Every time a file is dropped in a folder, there should be a script running at all times. What this script does is, simply copies this file in a different folder with timestamps as part of the new file name. The script should be smart enough to not copy the same file over and over, but just copies new files every time its dropped. I will highly appreciate if you can write this script for me in detail, as I do not understand anything when it comes to scripts. Thanks in advance
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Add TimeStamp to cron job and write file name sent

Hello, I have written a cron job to automate the sftp of files using key authentication. I wanted to add a timeStamp and name of file sent to a log file and append each these details to the same file each time files are sent and if possible include whether the files were sent successfully or not.... (3 Replies)
Discussion started by: KidKoder
3 Replies

2. UNIX for Dummies Questions & Answers

Execution problem with Cron: Script works manually but not w/Cron. Why?

Hello gurus, I am making what I think is a simple db2 call from within a shell script but I am having difficulty producing the desired report when I run the script shown below from a shell script in cron. For example, my script and the crontab file setup is shown below: #!/bin/ksh db2... (3 Replies)
Discussion started by: okonita
3 Replies

3. Shell Programming and Scripting

Need help to write script

I am having a File format as mentioned below Employee id|Name|Languages 12345|Hema|02|English|Hindi 4567|Basha|03|Engligh|Hindi|Telegu the 02 and 03 are counters. Using that we need to generate the output records as mentioned below 12345|Hema|English 12345|Hema|Hindi ... (8 Replies)
Discussion started by: bashamsc
8 Replies

4. Shell Programming and Scripting

How to write this script?

How to write this script? I want to write script so that is "/var" partition exceeds 90% then it should mail to me. Please give me guidelines. Thanks!!!!!!!!!!!!!!!!!!!!!!!!!!:confused: (3 Replies)
Discussion started by: manalisharmabe
3 Replies

5. Shell Programming and Scripting

How to write cron job for calling sql function database is postgres

Hi, Please help me to write cron job for calling sql function daily. I have Postgres database. (1 Reply)
Discussion started by: kulbhushan
1 Replies

6. IP Networking

read/write,write/write lock with smbclient fails

Hi, We have smb client running on two of the linux boxes and smb server on another linux system. During a backup operation which uses smb, read of a file was allowed while write to the same file was going on.Also simultaneous writes to the same file were allowed.Following are the settings in the... (1 Reply)
Discussion started by: swatidas11
1 Replies

7. Shell Programming and Scripting

how to run script? call other script? su to another user? make a cron?

Good morning. I am searching for "how-to"'s for some particular questions: 1. How to write a script in HP-UX 11. 2. How to schedule a script. 3. How to "call" scripts from the original script. 4. How to su to another user from within a script. This is the basics of what the... (15 Replies)
Discussion started by: instant000
15 Replies

8. UNIX for Dummies Questions & Answers

Should I write a PERL Script or Shell Script?

Hello, I have done some BASIC shell scripting/PERL scripting before so I am familiar with the languages. I am not really sure which one would lend itself better to the application I have to write. I am required to scan the message logs for possible break in attempts. If I use shell scripting... (2 Replies)
Discussion started by: mojoman
2 Replies

9. UNIX for Dummies Questions & Answers

Can I write a cron to do this?

OK, I'm new to UNIX so please be patient. I'm wondering if I can set up a cron task on my web server(unix) to control a flash based mp3 player like xspf. What I would like to accomplish is to have xspf player (on my web site) play one new mp3 every 24hrs. So song one would start at 00:02 and... (2 Replies)
Discussion started by: kvk
2 Replies

10. Shell Programming and Scripting

Need to write a cron jon(tcsh)....Help me out!!

The question I personally have is will it be possible to design the cron job according to this ‘wish list': 1)Every time cron starts (I mean files are found and processing begins) - email send to a user or to a group of users. 2)The job is divided into 2 separate parts, 2nd jobs starts only... (2 Replies)
Discussion started by: kumarsaravana_s
2 Replies
Login or Register to Ask a Question
uudemon(4)						     Kernel Interfaces Manual							uudemon(4)

NAME
uudemon.admin, uudemon.cleanu, uudemon.hour, uudemon.poll - Administrative shell scripts for polling remote systems, cleaning up spool directories, reporting status to the system administrator, and routine invocations of the uuxqt and uusched daemons SYNOPSIS
These shell scripts reside in the following directory: /usr/lib/uucp DESCRIPTION
All the scripts can be run from the command line or can be run automatically by the cron daemon. To automatically run the scripts, remove the comment character (#) from the beginning of the relevant line in the /var/spool/cron/crontabs/uucp file. This script reports status to the system administrator. It issues the uustat command to find out the status of uucp jobs. It mails the results to the uucp login ID. The script may be modified to send mail to any login ID such as the uucp administrative login ID (uucpa) or root. This script cleans up the /var/spool/uucp and /var/spool/uucppublic directories by running the uucleanup command. The uucleanup com- mand is run with the following parameters: -C7, -D7, X2, -o2, -W1. This script runs the uusched and uuxqt daemons in the background. This script polls the systems listed in the /usr/lib/uucp/Poll file. The uudemon.poll script should be scheduled before the uudemon.hour script. This allows uudemon.poll to create any command files before cron runs the uudemon.hour script. FILES
Contains the uudemon.admin, uudemon.cleanu, uudemon.hour and uudemon.poll files. Contains the uucp file. RELATED INFORMATION
Commands: cron(8), uucleanup(8), uusched(8), uuxqt(1) Files: /usr/lib/uucp delim off uudemon(4)