Find the answer to your Linux question:
Results 1 to 2 of 2
I use Fedora 10 I have set up a cron job from my account using " crontab -e" The thing that i want to run is shell script named connect.sh ...
  1. #1
    Just Joined! jibesh_patra's Avatar
    Join Date
    Feb 2009
    Posts
    1

    Cron help

    I use Fedora 10

    I have set up a cron job from my account using " crontab -e"

    The thing that i want to run is shell script named connect.sh
    It's content is : sudo /sbin/ifup ppp0

    I have put connect.sh in a folder in my home directory named MyShellScripts.
    [Note: I have set execute permissions for connect.sh]

    In the crontab edit i have put the following :

    00 02 * * * /home/Jibesh/MyShellScripts/connect.sh
    [ I mean to run the job at 2:00 AM in the morning ]

    /etc/sudoers I have put the following -
    Jibesh ALL=(root) NOPASSWD: /sbin/ifup ppp0

    If i simply run connect.sh it runs like a breeze, unfortunately the cron job don't run.
    Can any one point out what went wrong

  2. #2
    Linux Newbie
    Join Date
    Feb 2009
    Posts
    99
    vi /etc/sysconfig/network-scripts/ifcfg-ppp0
    USERCTL=yes

    so you can use /sbin/ifup ppp0 as user.

Posting Permissions

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