11-02-2008
Create a cronjob
Hi,
unfortunately I don't have deep programming skills yet to create a little cronjob. It would be great if someone could help me with my little programm. How it should be programmed and correctly embedded to the cron daemon.
The programm should do the following:
1. Connect to a NFS share
2. If connection fails for several times, a mail should be sent to an admin
3. If connection succeeded look for two files with the pattern 'File1_*.XXX' and 'File1_*.YYY'
4. If both files are found move files to local system and append the actual system time to the files (in front of the file suffix)
5. Look in another directory for the file having the pattern 'File2_*' und rename it to'File2_YYYYMMDD_HHMMSS' with YYYYMMDD_HHMMSS being the timestamp from step 4
6. If there is more than one file with the pattern 'File2_*' send a mail to an admin and stop the program
7. Wait for a minute and remove the two files with pattern 'File3_*'. If there are not exactly two files with that pattern, send a mail to an admin
It is necessary that the job only runs once at a time.
It would be great if someone could help me along with my little program.
Thanks in advance!
Heinz
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Please can someone help me. I need to set up a cron job to measure CPU usage, Disk I/O and memory usage over a period of 1 minute along with the number of users logged into the system. I also need to send it to another user besides myself every hour. Please can someone help me! Thanks. (4 Replies)
Discussion started by: gerwhelan
4 Replies
2. HP-UX
Dear Guru,
I have submitted some cronjobs that has been running for quite sometimes. However, today I counter some cronjob did not run. Can you please explain what causes this to happen. Any system setting that limit number of cronjob per minutes to be started, etc?
Thanks.
Kelly (1 Reply)
Discussion started by: hcng08
1 Replies
3. UNIX for Dummies Questions & Answers
hi
iam new at unix.iam running a cronjob,which i want to run on the first day of every month at 1AM.this is what i have specified:
00 01 1 * *
is this corect? (1 Reply)
Discussion started by: wiz83
1 Replies
4. Solaris
HI,
What is the differnece between at / con job? thanks in advance. (1 Reply)
Discussion started by: mokkan
1 Replies
5. Shell Programming and Scripting
Hi,
I'm totally new to shell scripting. I need help in my crontab script. I'm trying to read some values from user (username, log file directory, server) and then use those value to create a crontab for log rotation after some interval of time.
creating crontabs manually isn't big deal.... (11 Replies)
Discussion started by: MisterKhan
11 Replies
6. UNIX for Dummies Questions & Answers
hi everyone I'm newbie in this forum hope I can get some help here :)
I have a command in crontab that executed every 1 minute
sometime this command need more than 1 minute to finish
the problem is, the crontab execute this command although it's not finish processing yet and causing the system... (7 Replies)
Discussion started by: 2j4h
7 Replies
7. UNIX for Dummies Questions & Answers
Hi I am very new to linux. I want to run a cronjob every 15 minutes that checks a directory for files. If the directory contains more than ten files I want it to send an email to me.
All I have is this...
*/15 * * * * ls -l | wc -l | | mail -s "This is just a test"
I would... (2 Replies)
Discussion started by: LinuxNewb
2 Replies
8. UNIX for Dummies Questions & Answers
Hello,
Can you please help me out in creating a cronjob that runs every 3rd business day of the month.
Thanks (2 Replies)
Discussion started by: AReddy
2 Replies
9. Shell Programming and Scripting
I have created one file that contains all the necessary info in it to create a download link. In each of the lines /results/analysis/output/Home/Auto_user_S5-00580-6-Medexome_67_032/plugin_out/FileExporter_out.67... (8 Replies)
Discussion started by: cmccabe
8 Replies
10. UNIX for Beginners Questions & Answers
How to set cronjob for 48 hours.
I can set for 2 days as shown below.
* * */2 * *
It is creating confusion for 30 days & 31 days per month. (3 Replies)
Discussion started by: Nishit
3 Replies
LEARN ABOUT DEBIAN
time-admin
time-admin(1) General Commands Manual time-admin(1)
NAME
time-admin - Time Administration Tool
SYNOPSIS
time-admin [OPTION...]
DESCRIPTION
time-admin is part of the GNOME system tools, a set of tools to easily access and manage system configuration.
time-admin allows you to set the time, date and timezone of your system, as well as setting any time server to synchronize your local time
server.
OPTIONS
time-admin accepts the standard GNOME and GTK options.
AUTHORS
time-admin was written by Carlos Garnacho Parro <garnacho@tuxerver.net> and others.
This manual page was written by Sven Arvidsson <sa@whiz.se>, for the Debian project (but may be used by others).
SEE ALSO
services-admin(1), shares-admin(1), network-admin(1), users-admin(1), gtk-options(7), gnome-options(7)
The online documentation available through the program's Help menu.
GNOME
2007-05-08 time-admin(1)