Results 1 to 5 of 5

Thread: cron & python

  1. #1

    Default cron & python

    Hello to all,

    this is my first post, and it is the first time that I happen to work with Suse ..

    my question is:

    I'm working with a machine SUSE Linux Enterprise Server,
    I should have run a python script in crontab every hour

    I entered the crontab file:
    sudo crontab-e

    and I added the line:
    30 **** / usr / bin / python / file_path / file.py

    someone please tell me what I'm wrong, because the script does not stellar ever run ...

    Thank you all ...

  2. #2

    Default Re: cron & python

    Is this a homework problem?

    You have no spaces between asterisks, and you have spaces around the
    slashes in the path to python, and then you have more slashes and spaces
    going to the .py file itself. Check `man 5 crontab` for more info.


    --
    Good luck.

    If you find this post helpful and are logged into the web interface,
    show your appreciation and click on the star below...

  3. #3

    Default Re: cron & python

    sorry, it's only a problem of cut and past.

    the right sintax is :

    30 * * * * /usr/bin/python /file_path/file.py

    but the script don't start...
    I have tried to start manualy and works...

  4. #4

    Default Re: cron & python

    Permissions? How did you set this line to run via crontab, exactly? What
    do you get in /var/log/messages at the bottom of each hour when it should run?
    --
    Good luck.

    If you find this post helpful and are logged into the web interface,
    show your appreciation and click on the star below...

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: cron & python

    On 2013-12-02 22:16, simohrchornet wrote:

    You are using SLES, not openSUSE. Please post here instead:
    SLES/SLED forums (same login/pass).

    >
    > sorry, it's only a problem of cut and past.
    >
    > the right sintax is :
    >
    > 30 * * * * /usr/bin/python /file_path/file.py


    Please use code tags for printouts and commands (the '#' button). Like this:

    Code:
    30 * * * *  /usr/bin/python  /file_path/file.py

    > but the script don't start...


    How do you know? Are you expecting output in a terminal, or some other
    visual clue? You will get none. Check your system email instead.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

Posting Permissions

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