Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Schedule the cron job for every 21day on saturday Post 303017031 by MadeInGermany on Tuesday 8th of May 2018 08:50:38 AM
Old 05-08-2018
Code:
0 6 * * 6 lr=./lastrun; [ "`find $lr -mtime -21`" ] || { touch $lr; /path/to/real/job; }

Assuming that . (the home directory) is writable.
The find will report the file if less than 21 days old, then nothing is done.
Otherwise the file is refreshed and the job is done.
 

7 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to Schedule job using cron(URGENT)

Hello All, I m newbie to Job scheduling. Suppose i have 2 files s1.sh and s2.sh i want to make a schedule such as run s1.sh at 2AM everyday and run s2.sh 9Pm everyday. Can anyone tell me how to schdule that using CRON and i want to know what is CRON and CRONTAB. Thanks in advance (2 Replies)
Discussion started by: ravi.sadani19
2 Replies

2. Shell Programming and Scripting

unable to schedule job in cron

Hi, from normal user(oracle) i am unable to run scheduled job in cron: os version: bash-2.03$ uname -a SunOS sumail02 5.8 Generic_117350-39 sun4u sparc SUNW,Ultra-60 bash-2.03$ crontab -l 55 * * * * sh /oracle/statistics.sh > /dev/null 2>&1 bash-2.03$ cat /oracle/statistics.sh... (2 Replies)
Discussion started by: prakash.gr
2 Replies

3. Shell Programming and Scripting

Cron to schedule job at different times

Hi, I want to run cron scheduler to run some script at different times of the day.But these times don't have some fix intervals. So how we can run jobs at 6:30AM, 1:00PM and 4:30PM everyday. Please help. Thanks Neeraj (2 Replies)
Discussion started by: apjneeraj
2 Replies

4. Shell Programming and Scripting

Schedule a Cron job

Hi all, I am new to cron jobs.. i wanted to schedule a cron job that wil send a mail to me at 3:00PM on 10th August ie is on Wednesday. 0 15 10 8 3 echo "message from UNIX here"|mail -s "your subject here" user@user.com However this was not executed... Can anyone please... (0 Replies)
Discussion started by: ch33ry
0 Replies

5. UNIX for Dummies Questions & Answers

Schedule a cron job

Hi, Can anyone help me out with scheduling a cron job for the below: i wnated to delete file from a folder on every sunday at 05:00 AM this is code i have used. ******************************************************* 0 05 * * 0 find /abc/xyz/pqrs/bak/ -type f -mtime +30 -exec rm -f... (5 Replies)
Discussion started by: ch33ry
5 Replies

6. Shell Programming and Scripting

schedule a job without Cron

Hi All, Is there any way (any utility) to schedule a job to run once in a week on RedHat Linux ? Note- Do not using Crontab. Thanks Pravin (1 Reply)
Discussion started by: pravin27
1 Replies

7. UNIX for Beginners Questions & Answers

Cron job is not running on schedule

Scheduled job is not running on time.but it is running when executing same command manually. 25 10 * * * /code/bin/ACCOUNT.ksh 1 >/dev/null 2 >&1 Manually executing the same Ksh -x /code/bin/ACCOUNT.ksh 1 >/dev/null 2 >&1 Followed steps Crontab -e Added the job to cron tab. (4 Replies)
Discussion started by: Myguest
4 Replies
globus_gram_job_manager_job_execution_environment(3)	      globus gram job manager	      globus_gram_job_manager_job_execution_environment(3)

NAME
globus_gram_job_manager_job_execution_environment - Job Execution Environment Environment Variables The GRAM Job Manager provides a minimal environment for user's jobs. The following environment variables will be set by the job manager. Variables marked with an asterisk (*) will only be set if a related job manager configuration option or RSL attribute is provided. Local schedulers may set additional environment variables. HOME The user's home directory. LOGNAME The user's login name. X509_USER_PROXY The path to the job manager's delegated credential. (GSI only). GLOBUS_GRAM_JOB_CONTACT The job manager's contact string for this job. GLOBUS_LOCATION The path to the Globus installation on the job manager host. X509_CERT_DIR* The path to a trusted certificate directory. This variable will only be set if the -x509-cert-dir argument is given to the job manager. GLOBUS_GASS_CACHE_DEFAULT* The path to the job's GASS cache (if the gass_cache RSL attribute is present). GLOBUS_TCP_PORT_RANGE* A system-specific range of TCP ports which may be used by the job. Globus I/O will automatically honor this range. Only present if the related configuration option is present in the job manager configuration file. GLOBUS_REMOTE_IO_URL* The path to a file containing a URL string of a GASS server which the job may access (if the remote_io_url attribute is present). GLOBUS_NEXUS_NO_GSI Disables GSI in Nexus's TCP protocol, for compatibility with Nexus 4.6 and earlier. RSL Substitions In addition to the environment variables described above, a number of RSL substitutions are made available by the job manager. These substitions may be added to the environment by the job RSL if needed. HOME The user's home directory. LOGNAME The user's login name. GLOBUS_ID The subject name of the security credentials under which the job is running. GLOBUS_GRAM_JOB_CONTACT The job manager's contact string for this job. GLOBUS_HOST_MANUFACTURER The manufacturer part of the host configuration string (derived from config.guess) GLOBUS_HOST_CPUTYPE The CPU type part of the host configuration string (derived from config.guess) GLOBUS_HOST_OSNAME The operating system name part of the host configuration string (derived from config.guess) GLOBUS_HOST_OSVERSION The operating system version number part of the host configuration string (derived from config.guess) GLOBUS_GATEKEEPER_HOST The name of the host on which the gatekeeper is running. GLOBUS_GATEKEEPER_PORT The TCP port which on which the gatekeeper is accepting connections. GLOBUS_GATEKEEPER_SUBJECT The subject name of the security credentials under which the gatekeeper is running. GLOBUS_LOCATION The path to the Globus installation on the job manager host. GLOBUS_CACHED_STDOUT The name of the local file in the cache where stdout is being stored. This may be used as the value of the stdout RSL attribute to cause one copy of output to be stored in the cache. A stdio_update signal may be used to retrieve the output when the job is finishing. GLOBUS_CACHED_STDERR The name of the local file in the cache where stderr is being stored. This may be used as the value of the stderr RSL attribute to cause one copy of output to be stored in the cache. A stdio_update signal may be used to retrieve the output when the job is finishing. SCRATCH_DIRECTORY The path of the scratch directory for this job. (Only set if the scratch_dir RSL attribute is used). GLOBUS_CONDOR_ARCH The condor name of the architecture which the job manager is handling jobs for. (deprecated) GLOBUS_CONDOR_OS The condor name of the operating system which the job manager is handling jobs for. (deprecated) Version 13.33 Mon Apr 30 2012 globus_gram_job_manager_job_execution_environment(3)
All times are GMT -4. The time now is 09:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy