Sponsored Content
Full Discussion: Cron job shell script..
Top Forums Shell Programming and Scripting Cron job shell script.. Post 302342127 by RiSk on Friday 7th of August 2009 12:37:46 PM
Old 08-07-2009
if you can install fcron it will support more complex time arguments, if you are forced to use standard cron, try this.

Code:
0 0,3,6,9,12,15,18,21 * * * rm -r /folder1/folder2/somefile.txt

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

CRON-Job / Shell-Skript deleting special files

Just I'm trying to find script, which will do the following job: 1. as a CRON-Job it shoult a) delete files which will be either older than 24 hours or b) all files within a) a directory deleting recursive b) only a special directory. 2. write an error-/Delete_log... (9 Replies)
Discussion started by: ManfredWL
9 Replies

2. Shell Programming and Scripting

Backup with shell program and cron job.

Hi, The object of my program is to take automatic backup on daily basis to different folders. I have created the respective folders. when I execute below given shell program manually it is working perfectly and taking the backup to respective folder. #!/bin/sh #script to take backup on... (1 Reply)
Discussion started by: jarkvarma
1 Replies

3. UNIX for Dummies Questions & Answers

shell script run by user or cron job ?

My shell script runs fine both as a cron job and when i issue it. However, I wish to differentiate when it runs as a cron-job so the "echo" statements are not issued (they get mailed to me, which i don't want). I tried checking $USER but since the cron was created in my user that does not... (5 Replies)
Discussion started by: sentinel
5 Replies

4. Shell Programming and Scripting

cron job - shell code correction

Hi I have a website that is having problem with cron jobs... I have a cron job set up to go to a page with this code... <? include('config.php'); if($_sys->bible_email_frequency == 'DAILY') { $u = new user(); $u->send_bible_email(); } ?> If i send my browser to this page... (2 Replies)
Discussion started by: whybelieve
2 Replies

5. Shell Programming and Scripting

URGENT: cron job not running the sqlplus command in shell script

cron job not running the sqlplus command in shell script but the shell script works fine from command line.. Cronjob: 5 * * * * /home/dreg/script.sh script.sh: #!/bin/ksh /oracle/u000/app/oracle/product/10204/GEN/bin/sqlplus -s <user>/<pass>@<sid/home/dreg/sqlscript.sh ... (18 Replies)
Discussion started by: Ikea
18 Replies

6. Solaris

Shell Script gives error when run through cron job.

Hi, The following shell script runs without any problem when executed manulally. USED=$(df -h /arch | tail -1 | awk '{print $5}' | cut -d '%' -f 1) if then find /arch/AUBUAT/ -type f -mtime +0 | xargs rm find /arch/AUBMIG/ -type f -mtime +0 | xargs rm fi But the same gives below... (6 Replies)
Discussion started by: ksadiq79
6 Replies

7. UNIX for Dummies Questions & Answers

cron job for the created shell script

Hi am newbie for unix shell.. how to create a cron job for my already created shell script.:confused: Thanks! (1 Reply)
Discussion started by: vidhyaS
1 Replies

8. Shell Programming and Scripting

Cron job and shell script to kill a process if memory gets to high

Hello, I'd like to set a cron job that runs a shell script every 30 minutes or so to restart a java based service if the memory gets above 80%. Any advice on how to do this? Thanks in advance! - Ryan (19 Replies)
Discussion started by: prometheon123
19 Replies

9. Shell Programming and Scripting

Shell script not getting called through cron job but executes fine manually.

Hi, My shell script not getting called through cron job. The same works fine when executed manually. I tried to generate logs to find if the scripts has some errors related to path using following command- trying to execute .sh file every 5 mins: */5 * * * * /home/myfolder/abc.sh... (17 Replies)
Discussion started by: Dejavu20
17 Replies

10. Shell Programming and Scripting

Shell script to set trap for finding cron job failures

Unix box: solaris 5.8 Server: IP Need to to set trap for cron job failures by writing a shell script (5 Replies)
Discussion started by: ChandruBala73
5 Replies
DH_INSTALLYORICK(1)						     Debhelper						       DH_INSTALLYORICK(1)

NAME
dh_installyorick - install Yorick add-on packages SYNOPSIS
dh_installyorick [debhelper options] [-m] [--no-make-install] DESCRIPTION
dh_installyorick is a debhelper program that installs the files of your Yorick add-on at the right place when building a Debian package. For a simple plug-in package, this is mostly done by calling "make DESTDIR=debian/<package> install" and then moving arch-independent files to usr/share. Note that there is no Y_SITE/contrib directory in the Debian packages, its content is merged into YSITE/i. Calling "make ... install" can be disabled by using the "--no-make-install" flag. This is useful in particular for interpreted add-on pack- ages, which do not ship with a standard Yorick Makefile. If the "-m" flag is used (but not the "-n" one), dh_installyorick will also add lines to your package's postinst and postrm scripts to call "update-yorickdoc --auto" if the yorick-doc package is installed. It is necessary to call dh_installdeb after dh_installyorick for this to work. It is usually not necessary with a recent dpkg supporting triggers, so this possibility is kept mostly for easing backports and should be deprecated soon. dh_installyorick will look for a file named debian/<package>.ynstall for additional files to install (see YNSTALL FILE below). The prefix "<package>." can be omitted for the main binary package being built (usally the first one listed in debian/control). For the time being, Y_SITE=Y_HOME=/usr/lib/yorick. Requests to install a file under Y_SITE results in its installation under /usr/share/yorick. dh_installyorick handles the creation of the necessary symbolic links from Y_HOME to /usr/share/yorick. Files that are installed in a directory ending in "/bin" or "/sbin", as well as files that are pointed at by symbolic link in such a direc- tory, are installed with execution permission for everyone. OPTIONS
-m Modify postinst/postrm scripts to add a call to update-yorickdoc. This is needed only if the target dpkg does not support triggers. If both "-m" and "-n" are specified, the scripts are not modified. --no-make-install Do not call "make DESTDIR=debian/<package> install". --infofile= An additional pkg_mngr .info file to install. Additionally, dh_installyorick abides by the following standard debhelper options: -a/--arch, -i/--indep, --mainpackage, -n, --no-act, -N/--no-package, -p/--package, -P/--tmpdir, -s/--same-arch, and -v/--verbose. YNSTALL FILE
Blank lines are ignored, several blank character are counted as one, and line starting with "#" (possibly following one or more blanks) are ignored. Each non-comment, non-blank line should be of the form: file [directory [link]] Where file is the file to install, directory the directory it should be installed in, and link an optional symbolic link pointing on the installed file. file the relative path from the top directory of the package source to the file. If link is not specified, file can contain shell globs and actually denote sevral files. If directory is not specified, it is guessed from the extension of file: .i files are installed in Y_SITE/i, .gs and .gp in Y_SITE/g, .info in Y_SITE/packages/installed, .packinfo, .aliases and .keywords in /usr/share/yorick-doc, and .so in Y_HOME/lib. directory the full path (without leading "/") into which the file should be installed. If the file is to be installed inside Yorick's Y_SITE or Y_HOME directory (which will almost alway be the case), it is possible (and advisable) to not specify the full path, but to write "Y_SITE/" or "Y_HOME" followed by the relative path from there. It is also possible to omit this "Y_SITE/" or "Y_HOME/" prefix if directory starts whith one of: Y_SITE/i, Y_SITE/i0, Y_SITE/i-start, Y_SITE/g, Y_SITE/packages, Y_HOME/bin or Y_HOME/lib. link the full path to a symbolic link that should point to the installed file. The same shortcuts apply as for directory. EXAMPLES
The four following lines in debian/ynstall would be equivalent: somefile.i /usr/share/yorick/i somefile.i Y_SITE/i somefile.i i somefile.i Likewise, the following are equivalent: somefile.i /usr/share/yorick/i0 somefile.i Y_SITE/i0 somefile.i i0 Example with a symlink. Here, somefile.i is a script that is both useful #included from within Yorick or from the command line. Its first line reads "#!/usr/bin/yorick -batch". somefile.i i usr/bin/command_name SEE ALSO
debhelper(7), update-yorickdoc(1), deb-triggers(5) This program is a part of yorick-dev but is made to work with debhelper. Note that only compatibility level 5 has been implemented and tested. This script is not idempotent, dh_clean -k should be executed between any two runs. AUTHORS
Thibaut Paumard <paumard@users.sourceforge.net> 2008-05-15 DH_INSTALLYORICK(1)
All times are GMT -4. The time now is 03:59 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy