- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- cron and email???
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 02:51 AM
тАО04-25-2002 02:51 AM
cron and email???
But we have tried many times, and still there is no response.
We also test it just simply write out a command to copy file at a definite time, but also no repsonse.
So are there any problems or do we miss any procedures???
Thanks a lot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 03:51 AM
тАО04-25-2002 03:51 AM
Re: cron and email???
Can you put your crontab file here?
Do you try to email from the command line?
Can you put your script here?
Regards,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 05:18 AM
тАО04-25-2002 05:18 AM
Re: cron and email???
but it also not function. maybe I now attach the file, so can u please help me to take a look, to see whether it has problem??
here are the steps we have done:
1. create a txt file called "file.txt"
2. create a crontab file called "mycronfile" and the command line inside the file is "7 18 25 4 4 cp ../usr/test/file.txt ../usr/test/backup.txt
"
3. put "mycronfile" to the folder ./etc/cron.d
4. In Konsole typed "crontab mycronfile"
5. But no backup.txt is created
really thanks a lot.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 05:22 AM
тАО04-25-2002 05:22 AM
Re: cron and email???
Try removing the .. (dot dot) in front of the /usr. (since /usr/
- Nico
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 05:32 AM
тАО04-25-2002 05:32 AM
Re: cron and email???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 06:18 AM
тАО04-25-2002 06:18 AM
Re: cron and email???
Make a small shell script with something like:
user@system$ vi /tmp/test.sh
#!/bin/bash
echo "`date`"
echo " -- Testing cron -> mail "
(make sure to set the scipt with permissions set to execute,
user@system$ chmod 755 /tmp/test.sh
Place it in the crontab with
user@system$ crontab -e
0 * * * * /tmp/test.sh
this will execute the script every hour, remove the entry again when succesfull.
The small "script" will mail the output of test.sh to that user.
- Nico
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 07:49 AM
тАО04-25-2002 07:49 AM
Re: cron and email???
Sorry for the delay, I think that your problem is that you put a relative path in your crontab for the copy.
Try to put the absolute path in your cp command.
Something like that:
7 18 25 4 4 cp /usr/test/file.txt /usr/test/backup.txt
and other thing, you must edit your crontab file with the crontab -e command, if not you must reinitilize the cron daemon after you made the change.
Hope this help,
Justo.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 08:40 AM
тАО04-25-2002 08:40 AM
Re: cron and email???
but i have tried this, seems still not function. and I would like to ask how to check that the command has been executived. As you mention, you say that a mail will be sent out??? but where to receive that email ???
really thanks a lot
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 12:37 PM
тАО04-25-2002 12:37 PM
Re: cron and email???
I'm not certain that Mandrake's implementation of cron suffers the same restrictions, but there is a limit on the number of parameters that you feed a crontab entry, and on my system, that number is apparently 1.
So...
Put your commands into a script, and run the script from cron.
As to where to send the email output -- that depends entirely on your setup. Typically, the owner of the cron job would receive any email output. This can be aliased in your mail program's aliases file to go anywhere you like.
hth
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-25-2002 05:28 PM
тАО04-25-2002 05:28 PM
Re: cron and email???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО05-02-2002 07:16 AM
тАО05-02-2002 07:16 AM
Re: cron and email???
Created a file in the users home folder, in my case it was root.
In this file put in your cron commands
0 19 * * 1 /root/scripts/monday.pl
This command will run our monday backup script at 7:00
Save the file and then run crontab. In my case I saved it as /root/scripts/cronjobs so I would type in crontab /root/script/cronjobs. To verify if it is in place run crontab -l to list your cronjobs for that user.