- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: crontab
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
Forums
Discussions
Discussions
Discussions
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
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
08-25-2000 11:42 AM
08-25-2000 11:42 AM
Re: crontab
# crontab -l
[result : looks fine to me that including
0 9 ** 1-5 /usr/local/bin/uvscan]
# crontab -e
[result : could not connect to ToolTalk service: TT_ERR_PROCID
the process id passed is not valid]
anything wrong ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2000 11:49 AM
08-25-2000 11:49 AM
Re: crontab
/var/sool/cron/crontabs/root should be under root ownership and has 444 permission -r--r--r--.
Also, check the envirnonment variable, can you vi whatever with no problems? (terminl setting...)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2000 12:01 PM
08-25-2000 12:01 PM
Re: crontab
Regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2000 12:44 PM
08-25-2000 12:44 PM
Re: crontab
2) but still have same error msg.
3) i might need to test using another file (such as /usr/local/bin/netscape instead of uvscan).
4) or i might need to create an user under /var/spool/cron/crontabs instead of using /var/spool/cron/crontabs/root.
5) in anyway, i am still working on it, and you have good weekend!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-25-2000 12:50 PM
08-25-2000 12:50 PM
Re: crontab
Crontab -e is coming for some strange reason, and I guess is environment setting. Are you using vi as default editor?
Try something as export EDITOR=vi from the command line. After that do again crontab -e If work and put you under vi in that file, just get out.
I have no other idea. Anyway, have a good weekend, cron will work on Monday morning.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2000 06:29 AM
08-28-2000 06:29 AM
Re: crontab
1) i just did:
# EDITOR=vi
# crontab -e
[result is good as well as the result of crontab -l]
2) then, i modified and saved:
from 0 9 * * 1-5 /usr/local/bin/uvscan
to 0 10 * * 1-5 /usr/local/bin/uvscan
then i did:
# /sbin/init.d/cron stop
# /sbin/init.d/cron start
3) then, i was wait til 10 am, because i wanted to see running uvscan automatically at 10 am
4) but, it din not run anything at 10 am or later
5) so i checked:
# ps -ef|grep cron
[resut is:
root 6951 6630 1 10:01:32 pts/0 0:00 grep cron
root 6938 1 0 09:59:06 ? 0:00 /usr/sbin/cron]
6) however, when i ran uvscan manually at the prompt,
it is working if i do : # ./uvscan -cvr /
(it scanning/cleaning all files)
but it doesnt work under : # uvscan -cvr / (error msg says : /sbin/sh: uvscan: not found)
7) that means, i have to modify 'crontab -e'
from 0 10 * * 1-5 /usr/local/bin/uvscan
to 0 10 * * 1-5 /usr/local/bin/./uvscan
or 0 10 * * 1-5 /usr/local/bin/uvscan -cvr /
i know you gave me plenty info/tips already , (and i should assign points already instead of asking relating queations), but pls help me out to resolve this running problem!! thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2000 06:36 AM
08-28-2000 06:36 AM
Re: crontab
put in your script:
cd /usr/local/bin;
./
Then put your script where you wish and call it with cron using its full path
Good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2000 06:38 AM
08-28-2000 06:38 AM
Re: crontab
2. vi . profile (beeng on root home's directory)
add /usr/local/bin to the PATH variable:
export PATH=$PATH:/usr/local/bin
3. Run again the script from the command line.
4. If works, is going to work on cron as well.
Good luck.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2000 07:17 AM
08-28-2000 07:17 AM
Re: crontab
# vi . profile
[nothing were there.
i added '/usr/local/bin'
then tried to save, but it doesnt allow to save it]
did i do anything wrong??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2000 07:20 AM
08-28-2000 07:20 AM
Re: crontab
try :
:wq!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2000 07:24 AM
08-28-2000 07:24 AM
Re: crontab
Do
vi .profile, or better vi /etc/profile, or both.
In the vi screen, go to the end, and add the following line:
export PATH=$PATH:/usr/bin/local
Save it (type colon ":" and qw! and enter.
more /etc/profile, more .profile to see your line has been accepted (it is there).
Logout and login again to make the new profile working.
Try to run the script from the command line.
Any better?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2000 07:36 AM
08-28-2000 07:36 AM
Re: crontab
I think you edited .
(vi . profile)
Of course then it will not lest you save..
You should have seen a message like
. is a directory
I know that was what Antoanetta put in her before last message, she now has corrected it follow her procedure the ! when saving will let you save on read only files...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2000 07:37 AM
08-28-2000 07:37 AM
Re: crontab
First thing to check is whether cron in fact executed the command you gave it. Look in /var/adm/cron/log for the entries around 10AM. Make sure the command appears and was executed. Most likely, you will see it with a non-zero return code.
Usually this happens because the command depends upon environmental variables and cron executes without a shell environment. The easiest way to check this is to create a script that sources the environment for a user and then executes the command. for example:
#!/bin/ksh
. /etc/profile
. /home/user/.profile
/usr/local/bin/uvscan
Now have cron call this script rather than the program.
You may also wish to redirect the output of the script/command, unless it automatically creates your output files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2000 07:53 AM
08-28-2000 07:53 AM
Re: crontab
# vi /etc/profile
[using 'esc' key then 'j' key to bring a cursor at the very bottom, then using 'esc' then 'i' key to add line as 'export PATH=
$PATH:/usr/local/bin', then using 'esc' key and ':' and then 'wq!' to save it.]
then,
# more /etc/profile
[now, i can see 'export PATH=........']
then
# logout
[sh: logout: not found.]
# exit
# login
[entered user name 'root' and password'xxxxxx']
# uvscan -cvr /
[wow! now this command is working - previously i always typed './uvscan -cvr /' instead of 'uvscan -cvr /'
*** do i still need to modify 'crontab -e'
from '0 10 * * 1-5 /usr/local/bin/uvscan' to
'0 10 * * 1-5 /usr/local/bin/uvscan -cvr /'
???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2000 08:03 AM
08-28-2000 08:03 AM
Re: crontab
Look to see if it works now!
Good luck
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2000 07:34 AM
08-29-2000 07:34 AM
Re: crontab
2) in other words, if i setup crontab like
'0 9 * * 1-5 /usr/local/bin/netscape'
tyhe it will run or pop up automatically every morning at 9 am ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2000 07:39 AM
08-29-2000 07:39 AM
Re: crontab
i was waiting this morning 9am, but there was nothing happen or running antivirus program.
that is the reason why that i might need to test using another crontab program.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2000 07:43 AM
08-29-2000 07:43 AM
Re: crontab
Tony
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2000 07:45 AM
08-29-2000 07:45 AM
Re: crontab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2000 07:49 AM
08-29-2000 07:49 AM
Re: crontab
Add something as:
05,15,25,35,45,55 * * * * /usr/bin/more /etc/hosts | mailx -s "List of hosts" root@boxname.domainname
This is going to send to root every 10 min. the /etc/hosts file.
Also you can check the log:
tail /var/adm/cron/log to see the last cron job executed.
Of course, if you modify the crontab file, do not forget to stop and start the cron daemon (/sbin/init.d/cron stop and start).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2000 07:55 AM
08-29-2000 07:55 AM
Re: crontab
Then in your cronfile your line could look like:
0 9 * * 1-5 /usr/local/bin/customuvscan >>/mylogdir/cusomvgscan.log 2>>/mylogdir/customvgscan.err
Some already have reminded you to be more generous with the contributors who all have given time and good advices...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2000 09:51 AM
08-29-2000 09:51 AM
Re: crontab
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2000 09:52 AM
08-29-2000 09:52 AM
Re: crontab
# cd /var/adm/cron
# ls
# more log
[result is:
! *** cron started *** pid=7411 Tus Aug
04:31:10 EDT 2000
>CMD: /usr/sbin/dmesg - >>/var/adm/messages
>root 7413 c Tue Aug 29 04:35:00 EDT 2000
>root 7415 c Tue Aug 29 04:45:00 EDT 2000
>root 7418 c Tue Aug 29 04:55:00 EDT 2000
.
.
.
>CMD: /usr/sbin/dmesg - >>/var/adm/messages
>root 7468 c Tue Aug 29 08:55:00 EDT 2000
>root 7470 c Tue Aug 29 09:00:00 EDT 2000
.
.
>CMD: /usr/sbin/dmesg - >>/var/adm/messages
>root 7516 c Tue Aug 29 10:05:00 EDT 2000
2)i can see uvscan is there. this means it was running in the back but i couldnt see the actual running screen visually???
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2000 09:56 AM
08-29-2000 09:56 AM
Re: crontab
Does the uvscan keep a log file of its own? If so, check it as well to see if any additional info from the uvscan run is present?
(It did what, when, why, etc...)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-29-2000 09:57 AM
08-29-2000 09:57 AM
Re: crontab
Particulary, for your issue, what this uvscan is doing? If giving output to the screen, try to capture them in a file that can be analyze latter, something as:
...... /usr/local/bin/uvscan >/mylocation/output (or whatever you like).
Run it first from command line. If worked, is working from cron as well.