Computing.Net > Forums > Unix > Running Crontab at login/logout

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Running Crontab at login/logout

Reply to Message Icon

Name: bobcatnyc
Date: May 17, 2005 at 07:57:42 Pacific
OS: Mac os X
CPU/Ram: 2ghz dual
Comment:

hi all! i was wondering if anyone knew how to get set
crontabs to run at login/logout?

thanks



Sponsored Link
Ads by Google

Response Number 1
Name: Luke Chi
Date: May 17, 2005 at 08:32:25 Pacific
Reply:

1. crontab is used to schedule jobs that are executed automatically by cron on a regular basis. It's time-based, not event-based.

2. For login, use /etc/profile, $HOME/.profile, ... depending on the login shell in /etc/passwd.

3. For logout, you may try to create a customed shell(s) to include atexit:

#include <stdlib.h>
int atexit(void (*func)(void));


Luke Chi


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: Running Crontab at login/logout

Problem while running CRONTAB www.computing.net/answers/unix/problem-while-running-crontab/2513.html

HELP! Time Controlled user login/logout www.computing.net/answers/unix/help-time-controlled-user-loginlogout-/2791.html

Running a Java class in the crontab www.computing.net/answers/unix/running-a-java-class-in-the-crontab/4076.html