Sponsored Content
Top Forums Shell Programming and Scripting I want to send an email after cron job Post 302936011 by countrydj on Saturday 21st of February 2015 03:36:24 PM
Old 02-21-2015
Hi RudiC...
Thanks for your reply.
Quote:
Wouldn't the mail's source text contain that time stamp?
Yes it would. However, the emails will be listed and I want to see the date in the SUBJECT line. i.e.
Code:
date | /bin/mail -s "wsaler the curent date and time backup finished" jc@ukzone.com

This shows in the email Subject:
Quote:
wsaler the curent date and time backup finished
I want it to read
Quote:
wsaler Sat Feb 21 18:00:01 GMT 2015 backup finished
I hope this makes it clearer what I am trying to achieve.

Thanks,

John C
 

10 More Discussions You Might Find Interesting

1. Solaris

Sun Solaris version 10: cron job does not send the default message.

Hi all, Our servers were on Sun Solaris 8.1, anytime a cron job executed the user ran that job received a email of job's output. I think that the default and Administrator did not setup anything. However, when we upgraded the OS to Sun Solaris ver.10, the cron job is no longer send a email... (2 Replies)
Discussion started by: cmnguyen
2 Replies

2. AIX

Cron Job notification email

Hi, I'm fairly new to Aix and am looking for some help on the following. I have setup a cron job under root and want it to send the email once it's run to an external email address. I can get it to send the output in an email to me by using mail on the end of the crontab entry. But I would... (1 Reply)
Discussion started by: elmesy
1 Replies

3. Shell Programming and Scripting

Cron Job Automated Email Alternatives?

Hi guys, not sure if this would be the right place for this but I dont where else it would go... I'm new to Unix too, so please bare with me :) I guess first up some background on the situation. We have some scripts that run as cron jobs which monitor and check the health, etc of our servers.... (2 Replies)
Discussion started by: BrianD
2 Replies

4. Shell Programming and Scripting

Send an email once a job is completed

Hi, The HPCs I used earlier used PBS (Portable Batch System) to schedule when I was running various jobs and it had an option to send me an email once a job is completed. I'm wondering whether this is possible for any other process (without the use of PBS). For example, I'm running some codes... (2 Replies)
Discussion started by: lost.identity
2 Replies

5. Shell Programming and Scripting

Echo print in different lines within email sent by Cron job

Hi all, I think this could have a simple solution, just I canīt get it so far. I have the script below that includes several echo commands in order to show that every part of the script have been executed. A cron job executes this script and when is completed the output is sent by email. ... (4 Replies)
Discussion started by: cgkmal
4 Replies

6. Shell Programming and Scripting

Send a file through email using cron as an attachment

Hi All, I want to send a file as an attachment through cron job.Is this possible using cronjob nd if it i, can you please let me know how to do this? Thanks (2 Replies)
Discussion started by: NARESH1302
2 Replies

7. Shell Programming and Scripting

how to avoid cron job output to send to the junk email folder?

Hi i created a cron job which invoke a shell script and output some content via email. Some times these output are sent to the junk email folder. i want these mails to be sent to inbox with some specific font. what i have to do? (4 Replies)
Discussion started by: vidhyaS
4 Replies

8. Shell Programming and Scripting

how to run a script using cron job and send the output as attachment via e-mail using unix

how to run a script using cron job and send the output as attachment via e-mail using unix. please help me. how my cron job entry should be? As of now my cron job entry is to run the script at specific time, 15 03 * * * /path/sample.sh | mail -s "Logs" email_id In the above entry, what... (8 Replies)
Discussion started by: vidhyaS
8 Replies

9. Solaris

Solaris cron job email generation not required

Hi, How do we stop default cron job emails bein generated in Solaris 10? All our cron entries are ending with /dev/null 2>&1 but still emails are being generated. And all these emails are nuisance, as they are also get relayed to our local network sendmail MTA server (for system email... (14 Replies)
Discussion started by: hasan.kamali
14 Replies

10. Shell Programming and Scripting

Script that will send an email if the cron job did not run.

Team, Would like to know what is the best script that will send you an email if cronjob did not run. Thanks (4 Replies)
Discussion started by: kenshinhimura
4 Replies
BACKUP_JOBS(8)						       AFS Command Reference						    BACKUP_JOBS(8)

NAME
backup_jobs - Lists pending and running operations in interactive mode SYNOPSIS
jobs [-help] j [-h] DESCRIPTION
The backup jobs command lists the job ID number and status of each backup operation running or pending in the current interactive session. This command can be issued in interactive mode only. If the issuer of the backup interactive command included the -localauth flag, the -cell argument, or both, those settings apply to this command also. To terminate operations that appear in the output, issue the backup kill command and identify the operation to cancel with the job ID number from this command's output. To check the status of a Tape Coordinator, rather than of a certain operation, use the backup status command. OPTIONS
-help Prints the online help for this command. All other valid options are ignored. OUTPUT
The output always includes the expiration date and time of the tokens that the backup command interpreter is using during the current interactive session, in the following format: <date> <time>: TOKEN EXPIRATION If the execution date and time specified for a scheduled dump operation is later than <date time>, then its individual line (as described in the following paragraphs) appears below this line to indicate that the current tokens will not be available to it. If the issuer of the backup command included the -localauth flag when entering interactive mode, the line instead reads as follows: : TOKEN NEVER EXPIRES The entry for a scheduled dump operation has the following format: Job <job_ID>: <timestamp>: dump <volume_set> <dump_level> where <job_ID> Is a job identification number assigned by the Backup System. <timestamp> Indicates the date and time the dump operation is to begin, in the format month/date/year hours:minutes (in 24-hour format) <volume_set> Indicates the volume set to dump. <dump_level> Indicates the dump level at which to perform the dump operation. The line for a pending or running operation of any other type has the following format: Job <job_ID>: <operation> <status> where <job_ID> Is a job identification number assigned by the Backup System. <operation> Identifies the operation the Tape Coordinator is performing, which is initiated by the indicated command: Dump (dump name) Initiated by the backup dump command. The dump name has the following format: <volume_set_name>.<dump_level_name> Restore Initiated by the backup diskrestore, backup volrestore, or backup volsetrestore command. Labeltape (tape_label) Initiated by the backup labeltapen command. The tape_label is the name specified by the backup labeltape command's -name or -pname argument. Scantape Initiated by the backup scantape command. SaveDb Initiated by the backup savedb command. RestoreDb Initiated by the backup restoredb command. <status> Indicates the job's current status in one of the following messages. If no message appears, the job is either still pending or has finished. number Kbytes, volume volume_name For a running dump operation, indicates the number of kilobytes copied to tape or a backup data file so far, and the volume currently being dumped. number Kbytes, restore.volume For a running restore operation, indicates the number of kilobytes copied into AFS from a tape or a backup data file so far. [abort requested] The backup kill command was issued, but the termination signal has yet to reach the Tape Coordinator. [abort sent] The operation is canceled by the backup kill command. Once the Backup System removes an operation from the queue or stops it from running, it no longer appears at all in the output from the command. [butc contact lost] The backup command interpreter cannot reach the Tape Coordinator. The message can mean either that the Tape Coordinator handling the operation was terminated or failed while the operation was running, or that the connection to the Tape Coordinator timed out. [done] The Tape Coordinator has finished the operation. [drive wait] The operation is waiting for the specified tape drive to become free. [operator wait] The Tape Coordinator is waiting for the backup operator to insert a tape in the drive. EXAMPLES
The following example shows that two restore operations and one dump operation are running (presumably on different Tape Coordinators) and that the backup command interpreter's tokens expire on 22 April 1999 at 10:45 am: backup> jobs Job 1: Restore, 1306 Kbytes, restore.volume Job 2: Dump (user.sunday1), 34 Kbytes, volume user.pat.backup Job 3: Restore, 2498 Kbytes, restore.volume 04/22/1999 10:45: TOKEN EXPIRATION PRIVILEGE REQUIRED
None. However, queuing any operation requires privilege, and it is possible to issue this command only within the interactive session in which the jobs are queued. SEE ALSO
backup(8), backup_interactive(8), backup_kill(8), backup_quit(8) COPYRIGHT
IBM Corporation 2000. <http://www.ibm.com/> All Rights Reserved. This documentation is covered by the IBM Public License Version 1.0. It was converted from HTML to POD by software written by Chas Williams and Russ Allbery, based on work by Alf Wachsmann and Elizabeth Cassell. OpenAFS 2012-03-26 BACKUP_JOBS(8)
All times are GMT -4. The time now is 09:30 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy