Sponsored Content
Top Forums Shell Programming and Scripting Running script that sends an html formatted email fails when its run as cronjob Post 302236854 by cfajohnson on Tuesday 16th of September 2008 11:43:50 AM
Old 09-16-2008
Quote:
Originally Posted by Nightowl
Ok, I have been around this before and the environment is quite different, though, Im not sure which variables the script depends on or how to change the variables like PATH. How is this done?

Read the script and see what variables it uses but does not set.
Quote:
I have tried to type:
PATH=/root/bin etc,

Where did you type it?

What, exactly, did you type?
Quote:
but this returns an error

What is the error?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script not running thru Cronjob

Hi I have a shell script, it run ok if executed from the path it is located at but doesnot run when the same is tried through cron-job. can someone help me please. regards gaurav shrinivas Email address removed (8 Replies)
Discussion started by: gauravshrinivas
8 Replies

2. UNIX for Dummies Questions & Answers

cronjob to run perl script

Hi all Recently i had finished a perl script. When i run manually, the script work fine. But when i wanted to put the script in cron, it didn't get the same output as it run manually. I felt that it only execute the script until certain line then it stop as i see most of the related files didn't... (6 Replies)
Discussion started by: AirWalker83
6 Replies

3. Shell Programming and Scripting

write the script to get the file size and sends an email

hi all Anybody have an idea to write the script to get the file size and sends an email when file size increse more than 10mb. thanks (10 Replies)
Discussion started by: s_linux
10 Replies

4. UNIX for Dummies Questions & Answers

BASH script that sends text message or email

Hi, I have a BASH shell script that batch processes data. I often start this script before I leave to go home for the day, and leave it processing over night. It has come to my attention that it would be very useful for me to add the capability of making the script notify me about certain things... (2 Replies)
Discussion started by: msb65
2 Replies

5. AIX

My script didn't run every run every minute at cronjob

In my cronjob, I would like to schedule my script.sh to run every minutes. I crontab -e and have in line below but it didn't seems to run at all. * * * * * script.sh When I run it manually, I can run it. Is that anything wrong with the above line? If I change it to something like below,... (4 Replies)
Discussion started by: ngaisteve1
4 Replies

6. Shell Programming and Scripting

Script to Alert a file and sends an email

Hello All, I need a script which alerts me when a files arrive in a directory. I don't need every file. but i need some specific pattern file. And i need to get automatic email gettin as an alert For Example: /a/b/c/ : directory format of file should take regualr expression or manually... (2 Replies)
Discussion started by: krux_rap
2 Replies

7. UNIX for Dummies Questions & Answers

Script not running through Cronjob

Hi, I have a .ksh script which updates the database. The script is running fine manually but it is not running through cron.All the file permissions are fine. The script contents are as below: #!/usr/bin/ksh ddate=`date +%Y%m%d` echo $ddate nohup sqlplus crm/crm @db_state_sync.sql >>... (3 Replies)
Discussion started by: shivangi
3 Replies

8. UNIX for Dummies Questions & Answers

Script does not run from a user specific cronjob.

Hello, I have two crontabs, one for the root and one for another user. There is a script in my configurations that has to send a email. The script works and sends the emails when I run it by hand with either the root or the user, and when I program it in the root's crontab. But! It does not... (3 Replies)
Discussion started by: Tralaraloro
3 Replies

9. Shell Programming and Scripting

Email body not formatted with html and sendmail

Hi All, I am trying to send the contents of a file as email body. I am using html email and sendmail option of unix. I am using the below piece of code for the same : #!/usr/bin/ksh export MAILTO="email@domain.com" export SUBJECT="Report" export BODY="file_directory_path/test_file.txt"... (1 Reply)
Discussion started by: rockygsd
1 Replies

10. Shell Programming and Scripting

Script fails to run properly when run from CRONTAB

Hello all, I'm trying to write a script to gather and send data and it works just fine at the bash command line, but when executing from CRON, it does not run properly. My scripting skills are pretty limited and there's probably a better way, but as I said it works at the command line, but... (12 Replies)
Discussion started by: rusman
12 Replies
DumpXML(3pm)						User Contributed Perl Documentation					      DumpXML(3pm)

NAME
Data::DumpXML - Dump arbitrary data structures as XML SYNOPSIS
use Data::DumpXML qw(dump_xml); $xml = dump_xml(@list) DESCRIPTION
This module provides a single function called dump_xml() that takes a list of Perl values as its argument and produces a string as its result. The string returned is an XML document that represents any Perl data structures passed to the function. Reference loops are han- dled correctly. The following data model is used: data : scalar* scalar = undef | str | ref | alias ref : scalar | array | hash | glob | code array: scalar* hash: (key scalar)* The distribution comes with an XML schema and a DTD that more formally describe this structure. As an example of the XML documents produced, the following call: $a = bless [1,2], "Foo"; dump_xml($a); produces: <?xml version="1.0" encoding="US-ASCII"?> <data xmlns="http://www.cpan.org/.../Data-DumpXML.xsd"> <ref> <array class="Foo"> <str>1</str> <str>2</str> </array> </ref> </data> If dump_xml() is called in a void context, then the dump is printed on STDERR automatically. For compatibility with "Data::Dump", there is also an alias for dump_xml() called simply dump(). "Data::DumpXML::Parser" is a class that can restore data structures dumped by dump_xml(). Configuration variables The generated XML is influenced by a set of configuration variables. If you modify them, then it is a good idea to localize the effect. For example: sub my_dump_xml { local $Data::DumpXML::INDENT = ""; local $Data::DumpXML::XML_DECL = 0; local $Data::DumpXML::DTD_LOCATION = ""; local $Data::DumpXML::NS_PREFIX = "dumpxml"; return dump_xml(@_); } The variables are: $Data::DumpXML::INDENT You can set the variable $Data::DumpXML::INDENT to control the amount of indenting. The variable contains the whitespace you want to be used for each level of indenting. The default is a single space. To suppress indenting, set it to "". $Data::DumpXML::INDENT_STYLE This variable controls where end element are placed. If you set this variable to the value "Lisp" then end tags are not prefixed by NL. This give a more compact output. $Data::DumpXML::XML_DECL This boolean variable controls whether an XML declaration should be prefixed to the output. The XML declaration is the <?xml ...?> thingy. The default is 1. Set this value to 0 to suppress the declaration. $Data::DumpXML::NAMESPACE This variable contains the namespace used for the XML elements. The default is to let this be a URI that actually resolve to the XML schema on CPAN. Set it to "" to disable use of namespaces. $Data::DumpXML::NS_PREFIX This variable contains the namespace prefix to use on the elements. The default is "", which means that a default namespace will be declared. $Data::DumpXML::SCHEMA_LOCATION This variable contains the location of the XML schema. If this variable is non-empty, then an "xsi:schemaLocation" attribute is added to the top level "data" element. The default is not to include this, as the location can be inferred from the default XML namespace used. $Data::DumpXML::DTD_LOCATION This variable contains the location of the DTD. If this variable is non-empty, then a <!DOCTYPE ...> is included in the output. The default is to point to the DTD on CPAN. Set it to "" to suppress the <!DOCTYPE ...> line. BUGS
Class names with 8-bit characters are dumped as Latin-1, but converted to UTF-8 when restored by the Data::DumpXML::Parser. The content of globs and subroutines are not dumped. They are restored as the strings "** glob **" and "** code **". LVALUE and IO objects are not dumped at all. They simply disappear from the restored data structure. SEE ALSO
Data::DumpXML::Parser, XML::Parser, XML::Dumper, Data::Dump AUTHORS
The "Data::DumpXML" module is written by Gisle Aas <gisle@aas.no>, based on "Data::Dump". The "Data::Dump" module was written by Gisle Aas, based on "Data::Dumper" by Gurusamy Sarathy <gsar@umich.edu>. Copyright 1998-2003 Gisle Aas. Copyright 1996-1998 Gurusamy Sarathy. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.8.8 2006-04-08 DumpXML(3pm)
All times are GMT -4. The time now is 04:28 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy