Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 25

Thread: How to make an Automatic appointment

  1. #11
    Quote Originally Posted by Jesca Hagaze
    I typed this command to the root directory using a vi editor by creating a new file called calendar

    15 8 * * 1-5 xmessage -center -timeout 10"Good Morning!"
    0 12 * * 1-5 xmessage -center -timeout 10"Lunch time!"
    0 17 * * 1-5 xmessage -center -timeout 10"Go Home"
    0 23 * * 1-5 xmessage -center -tomeout 10"Still Here? Go to bed"
    10 8 * * 2-5 xmessage -center -timeout 10"Did you do your time card yesterday?"
    0 9 * * sun xmessage -center -timeout 10"Review this week reports"
    0 9 1 * * xmessage -center -timeout 10"Review this month activities"

    I got these error messages

    calendar: line 1: 15: command not found
    calendar: line 2: 0: command not found
    calendar: line 3: 0: command not found
    calendar: line 4: 0: command not found
    calendar: line 5: 10: command not found
    calendar: line 6: 0: command not found
    calendar: line 7: 0: command not found

    You need to not use vi to create a file called "calendar." You need to run a command:
    crontab -e
    and paste what redhead gave you in, then save it.

  2. #12
    Quote Originally Posted by TigerDragon
    You need to not use vi to create a file called "calendar." You need to run a command:
    crontab -e
    and paste what redhead gave you in, then save it.

    It is done
    Thank you very much
    God bless you

  3. #13
    Moderator
    Advisor
    redhead's Avatar
    Join Date
    Jun 2001
    Location
    Copenhagen, Denmark
    Posts
    811
    > man crontab
    SYNOPSIS
    crontab [ -u user ] file
    Meaning you need to tell crontab to run it, it is not a shell program or anything..
    Don't worry Ma'am. We're university students, - We know what We're doing.
    'Ruiat coelum, fiat voluntas tua.'
    Datalogi - en livsstil; Intet liv, ingen stil.

  4. #14
    If you are editing your own crontab entry, you only need "crontab -e" to do it. The -u user option is for addressing other users' crontab entries, and is used by root.

  5. #15
    Quote Originally Posted by Jesca Hagaze
    I tried to set the daily/weekly and monthly appointment using the SUSE Linux in vi editor in home directory, but still it doesn't work.
    What am I supposed to do.
    Thank you
    I need to set a daily, weekly and monthly appointment using IF statement and while loop. I tried the following script by creating a daily1.dat file in a root directory, it run the command to the foreground process.

    #!bin/bash
    #comment
    while i=0
    do
    grep 'date +%H:%M' daily1.dat
    done

  6. #16
    Quote Originally Posted by Jesca Hagaze
    I typed this command to the root directory using a vi editor by creating a new file called calendar

    15 8 * * 1-5 xmessage -center -timeout 10"Good Morning!"
    0 12 * * 1-5 xmessage -center -timeout 10"Lunch time!"
    0 17 * * 1-5 xmessage -center -timeout 10"Go Home"
    0 23 * * 1-5 xmessage -center -tomeout 10"Still Here? Go to bed"
    10 8 * * 2-5 xmessage -center -timeout 10"Did you do your time card yesterday?"
    0 9 * * sun xmessage -center -timeout 10"Review this week reports"
    0 9 1 * * xmessage -center -timeout 10"Review this month activities"

    I got these error messages

    calendar: line 1: 15: command not found
    calendar: line 2: 0: command not found
    calendar: line 3: 0: command not found
    calendar: line 4: 0: command not found
    calendar: line 5: 10: command not found
    calendar: line 6: 0: command not found
    calendar: line 7: 0: command not found
    Based on the above schedule/appointment, can I use it to set Personal calendar using shell script i.e using the while loop statement.

  7. #17

    Smile Automatic appointment

    I created this shell script so that it will remind/ give an alert all users From Monday - Friday at 8:15 that "Good Morning".

    #!/bin/bash
    $cat > appointment
    #
    #
    Take input()
    {
    appointment=0
    clear
    echo "Daily Appointment"
    read appointment
    if [! -f $appointment]; then
    echo "Appointment does not exists, creating $appointment database"
    echo "Appointment Application database file" > $appointment
    fi
    echo "Start reading Appointment schedule" > /etc/schedular.$$
    while:
    do
    echo -n "Good Morning"
    read na
    echo -n "8:15"
    read ti
    echo -n "is data okey (y/n)?"
    read ans
    if [$ans=y -o $ans=Y]; then
    recno = "expr $recno + 1
    echo "$rechno. $na $ti" >> /etc/schedular.$$
    fi
    done
    }

    Error message
    ./appointment: line 5: syntax error near unexpected token `('
    ./appointment: line 5: `Take input()'

    Is this the right way to write a shell script?, what can I do to make it function properly.
    Thank you for your respons

  8. #18
    Moderator
    Good Guru
    Compunuts's Avatar
    Join Date
    May 2001
    Location
    California
    Posts
    3,935
    Can some mod be kind enough to move this to Scripting-Programming forum. Thanks.
    LinuxVillage - The truely community run Linux/Floss forum !

    No IT BS !!

  9. #19

    Automatic appointment

    Quote Originally Posted by Compunuts
    Can some mod be kind enough to move this to Scripting-Programming forum. Thanks.
    I am learning, and you are the one to give me assistance. Thank you and be blessed.

  10. #20
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760
    Quote Originally Posted by Compunuts
    Can some mod be kind enough to move this to Scripting-Programming forum. Thanks.

    Would if I could ;D You and I are in the same boat here.

Similar Threads

  1. Automatic Appointment
    By Jesca Hagaze in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 05-15-2006, 01:46 PM
  2. Configure and use Automatic Updates (XP)
    By RickDev in forum Windows - General Topics
    Replies: 9
    Last Post: 08-19-2005, 08:45 AM
  3. automatic updates
    By elovkoff in forum Linux - Software, Applications & Programming
    Replies: 0
    Last Post: 03-11-2005, 09:20 PM
  4. Automatic login without gdm/kdm
    By atheist_deity in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 08-13-2003, 07:00 AM
  5. Automatic login in Linux
    By airhead in forum Linux - General Topics
    Replies: 5
    Last Post: 12-05-2001, 02:00 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •