Can we call crontab -e into .profile?


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Can we call crontab -e into .profile?
# 1  
Old 10-06-2011
Data Can we call crontab -e into .profile?

Hi All,

I have a doubt that can we call under whatever scripts we mention in crontab -e into .profile .

Because every weekend my server is going to restart so, my doubt whether crontab -e will automatically run my scripts or manually we have to save the crontab -e again?

If that crontab -e should not run automatically after restarted the server , It creates problem. So please clarify my doubt any one.?

My idea is can we place this crontab -e into .profile so When the server starts it runs. This idea will work or not? If yes how to implement this Idea?


Thanks in advance

Srivani K
# 2  
Old 10-06-2011
crontab -e is the command used to edit the crontab file. I think what your talking about is making sure the cron deamon is started after a reboot. The deamon is the process which reads crontab files and kicks off the commands and scripts specified within those files.

see man Man Page for cron (OpenSolaris Section 1m) - The UNIX and Linux Forums
# 3  
Old 10-06-2011
Thanks for your reply ...


Regards
Srivani K
# 4  
Old 10-06-2011
cron saves cron tables in files, which are not lost on reboot. rebooting is no problem, cron won't forget.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Attemp to call the .profile

i have this line of code on my script #!/bin/sh #enable the environment variable thru profile . .profile when i run the script it was unable to find the .profile sh ChgPwd.sh ChgPwd.sh: line 4: .: .profile: file not found the file .profile exists ls -altr .profile... (2 Replies)
Discussion started by: wtolentino
2 Replies

2. Shell Programming and Scripting

How do i call aliases from my .profile?

Hello all, Please my shell is ksh. I created .profile such that users can pick environments they want to use: echo Select your Environment!! echo " 1. Nigeria DEV" echo " 2. UEMOA DEV" echo " 3. CEMOA DEV" echo "Make your choice : \c" read choice if then ... fi if then (6 Replies)
Discussion started by: mofaloks
6 Replies

3. Shell Programming and Scripting

Call .profile in perl script

Hello Gurus Can anyone please let me know how to call .profle file in perl script When I am calling the .profile file its giving error Shall I create unix script which has .profile command and call perl script internally (2 Replies)
Discussion started by: Pratik4891
2 Replies

4. Shell Programming and Scripting

Users who desire to have their .profile executed must explicitly do so in the crontab entry. Why?

The .profile file should be read when the user logs in. So, there should be no need to execute .profile file again in a cron job (since the cron job is run after the user logs in). Doesn't the cron require login from the user. Then, from where does the cron execute? Please help!! (1 Reply)
Discussion started by: thulasidharan2k
1 Replies

5. Shell Programming and Scripting

Crontab jobs don't see variables defined in /etc/profile

Is it true that Crontab jobs don't see variables defined in /etc/profile? How to get around that? (4 Replies)
Discussion started by: proactiveaditya
4 Replies

6. Infrastructure Monitoring

trap in etc/profile and user .profile

Hello I really wonder what's trap in etc/profile and in each user .profile. I try to google for it but I think I have no luck. Mostly hit is SNMP traps which I think it is not the same thing. I want to know ... 1. What's a "trap 2 3" means and are there any other value I can set... (4 Replies)
Discussion started by: Smith
4 Replies

7. Infrastructure Monitoring

diffrence between method call and function call in perl

Hello, I have a problem with package and name space. require "/Mehran/DSGateEngineLib/general.pl"; use strict; sub System_Status_Main_Service_Status_Intrusion_Prevention { my %idpstatus; my @result; &General_ReadHash("/var/dsg/idp/settings",\%idpstatus); #print... (4 Replies)
Discussion started by: Zaxon
4 Replies

8. UNIX for Advanced & Expert Users

how to differentiate system call from library call

Hi, Ho do I differentiate system call from library call? for example if I am using chmod , how do I find out if it is a system call or library call? Thanks Muru (2 Replies)
Discussion started by: muru
2 Replies

9. Shell Programming and Scripting

How to call .profile in cron?

Hello all, I want to call my users .profile in cron? I understand that i have to do it explicitly in crontab entry. How can we do it ? How can i write a simple script calling it? Thanks & Regards Abhijeet (15 Replies)
Discussion started by: abhijeetkul
15 Replies

10. UNIX for Dummies Questions & Answers

changed .profile but didnt ./.profile, yet reflected changes

hi , i added ls -F to .profile. and i need to do ./.profile for the effect to take effect BUT i didnt and YET the next day when i came to work and log in, the changes took effect. i am on aix. please explain.. thanks (4 Replies)
Discussion started by: yls177
4 Replies
Login or Register to Ask a Question