Everyday appending info about all processes which are active..

I have problem but i didnt solve it. Could you help me? :slight_smile:

Problem: Everyday at 12.17 we will append information to the file "log" about users who are logged and the information about all processes which are active to the user_activity file in our home directory..

I know that I must use cron entry and "w" comand. but i dont know how to go on..?

17 12 * * * date /home/mavikartal/script1 #cron entry, everyday 12.17

this is a start to go with -

for the users logged in currently

w -h | awk '{ print $1 }' | sort -u

and the process information on what they are doing can be obtained from

ps -fu $user