Sponsored Content
Top Forums Shell Programming and Scripting crontab is not creating runtime files which are in script.. Post 302229554 by surekha268 on Wednesday 27th of August 2008 07:52:43 AM
Old 08-27-2008
Your "cron" job on hwdusa33
/wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/start_script.sh

produced the following output:
/wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/b2bstat.sh: /wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/teToday.log: cannot create
grep: can't open /wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/teToday.log
/wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/teToday.log: No such file or directory
/wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/b2bstat.sh: /wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/cnToday.log: cannot create
grep: can't open /wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/cnToday.log
/wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/cnToday.log: No such file or directory
b2bstat.sh
/wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/start_script.sh: /wls_domains/eoigw/eoigwsA/logs/reports/dailyreport_env.log: cannot create
report_daily.sh
/wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/start_script.sh: /wls_domains/eoigw/eoigwsA/logs/reports/dailyreport_env.log: cannot create
GenerateReport.sh

This is what i recived as output for cron.
here is my script
/wls_domains/eoigw/eoigwsA/deliv/cron/MailingScript/start_script.sh
when i execute it in this env it gives output as well send the mail
the cron account is on the same server.

 

10 More Discussions You Might Find Interesting

1. Solaris

creating log files for a backup script on solaris

I have a simple backup script that I am running to back up drives across the network. However I need to have detailed log files for this script such as time backup started, what was backed up, if there were any errors and the time that the backup was complete. I would also like the script to... (3 Replies)
Discussion started by: valicon
3 Replies

2. Shell Programming and Scripting

runtime crontab entry

Hi, I have a query. When I execute a shell script say sh1.ksh, at the run time I need to put another shell script say sh2.ksh in the crontab with the parameter which we provided to sh1.ksh script, to execute sh2.ksh on the background for doing process. Also the cron entry needs to be... (1 Reply)
Discussion started by: mrpranab
1 Replies

3. Shell Programming and Scripting

Creating 1000 files using a script

I would like to write a script that would create 1000 files like clm0001.txt to clm1000.txt. All the files would contain the same contents. How do I achieve this using a script?Please help. (2 Replies)
Discussion started by: ggayathri
2 Replies

4. Shell Programming and Scripting

Need help creating a script to FTP files to a server and then delete the files that were transfered.

I am trying to FTP files to a Windows server through my Linux machine. I have setup the file transfer with no problems but am having problem deleting those files from the Linux box. My current non-working solution is below. Any ideas, anyone?? :wall: Please be gentle, I'm fairly new to this... (4 Replies)
Discussion started by: jmalfhs
4 Replies

5. Shell Programming and Scripting

crontab using shell script to sync files.

Hi, I developed one shell script where it will sync the files using perforce, #!/bin/bash TERM=linux export TERM clear echo "" $PATH echo "" cd /u/userk/p4/p4_client/TES_DATE echo "" echo "Sync p4 " p4 sync echo "Executing for second time " p4 -u userk -p p4net:161 -c... (8 Replies)
Discussion started by: asak
8 Replies

6. Shell Programming and Scripting

crontab not creating text file

while running the following code in ssh crontab, Its running successfully but its not creating text file IFC1.txt, file1.txt, file2.txt while running manually its working. please help me #!/bin/ksh hostname > file1.txt 2>/dev/null hostname >> file1.txt 2>/dev/null sudo df -h | grep... (2 Replies)
Discussion started by: elango963
2 Replies

7. UNIX for Dummies Questions & Answers

Crontab Logfile Not Creating

I have a script file (fmlist.sh), i need the output of this script to write to a logfile (Mod_Alm_log.txt). If i execute the below manually it works, but when using in crontab the file is empty. cd /home/dreid12/als/Modernization && ./fmlist.sh > Mod_Alm_log.txt Any ideas? This is unix on a... (1 Reply)
Discussion started by: mytouchsr
1 Replies

8. Shell Programming and Scripting

Bc in shell script is creating blank files

Hi, I am creating a shell script which will check the processing of the main script if the error count is more than 2% of the record count in a feed. Part of the code is below: err_tol=`echo $feed_cnt \* 0.02 |bc` while read line do err_cnt=$(grep -i "$line" $err_log | wc -l) ... (5 Replies)
Discussion started by: member2014
5 Replies

9. UNIX for Advanced & Expert Users

Help with creating script to delete log files/folders

Hi I am new to Linux / scripting language. I need to improve our Linux servers at work and looking to claim some space my deleting log files/ folders on a 5 day basis. Can someone help me with creating a script to do so. Any sample script will be helpful.:b: Regards (2 Replies)
Discussion started by: sachinksl
2 Replies

10. Shell Programming and Scripting

Need BASH Script Help to Move Files While Creating Directories

I've got this script to loop through all folders and move files that are more than 2 years old. I'm using the install command because it creates the necessary directories on the destination path and then I remove the source. I'd like to change the script to use the mv command since it is much... (4 Replies)
Discussion started by: consultant
4 Replies
cron(1M)                                                  System Administration Commands                                                  cron(1M)

NAME
cron - clock daemon SYNOPSIS
/usr/sbin/cron DESCRIPTION
cron starts a process that executes commands at specified dates and times. You can specify regularly scheduled commands to cron according to instructions found in crontab files in the directory /var/spool/cron/crontabs. Users can submit their own crontab file using the crontab(1) command. Commands which are to be executed only once can be submitted using the at(1) command. cron only examines crontab or at command files during its own process initialization phase and when the crontab or at command is run. This reduces the overhead of checking for new or changed files at regularly scheduled intervals. As cron never exits, it should be executed only once. This is done routinely by way of the svc:/system/cron:default service. The file /etc/cron.d/FIFO file is used as a lock file to prevent the execution of more than one instance of cron. cron captures the output of the job's stdout and stderr streams, and, if it is not empty, mails the output to the user. If the job does not produce output, no mail is sent to the user. An exception is if the job is an at(1) job and the -m option was specified when the job was submitted. cron and at jobs are not executed if your account is locked. Jobs and processses execute. The shadow(4) file defines which accounts are not locked and will have their jobs and processes executed. Setting cron Jobs Across Timezones The timezone of the cron daemon sets the system-wide timezone for cron entries. This, in turn, is by set by default system-wide using /etc/default/init. If some form of daylight savings or summer/winter time is in effect, then jobs scheduled during the switchover period could be executed once, twice, or not at all. Setting cron Defaults To keep a log of all actions taken by cron, you must specify CRONLOG=YES in the /etc/default/cron file. If you specify CRONLOG=NO, no log- ging is done. Keeping the log is a user configurable option since cron usually creates huge log files. You can specify the PATH for user cron jobs by using PATH= in /etc/default/cron. You can set the PATH for root cron jobs using SUPATH= in /etc/default/cron. Carefully consider the security implications of setting PATH and SUPATH. Example /etc/default/cron file: CRONLOG=YES PATH=/usr/bin:/usr/ucb: This example enables logging and sets the default PATH used by non-root jobs to /usr/bin:/usr/ucb:. Root jobs continue to use /usr/sbin:/usr/bin. The cron log file is periodically rotated by logadm(1M). FILES
/etc/cron.d Main cron directory /etc/cron.d/FIFO Lock file /etc/default/cron cron default settings file /var/cron/log cron history information /var/spool/cron Spool area /etc/cron.d/queuedefs Queue description file for at, batch, and cron /etc/logadm.conf Configuration file for logadm ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-----------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-----------------------------+ |Availability |SUNWcsu | +-----------------------------+-----------------------------+ SEE ALSO
svcs(1), at(1), crontab(1), sh(1), logadm(1M), svcadm(1M), queuedefs(4), shadow(4), attributes(5), smf(5) NOTES
The cron service is managed by the service management facility, smf(5), under the service identifier: svc:/system/cron:default Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(1M). The ser- vice's status can be queried using the svcs(1) command. DIAGNOSTICS
A history of all actions taken by cron is stored in /var/cron/log and possibly in /var/cron/olog. SunOS 5.10 5 Aug 2004 cron(1M)
All times are GMT -4. The time now is 10:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy