How to run a command defined by a user user1 on a crontab in ubuntu server? There is no root access in the server but the user user1 have all the root permissions. A cron tab needs to run every weekdays on 9:30 AM. The command is

30 9 * * 1-5 python pythonfile.py

this cron tab is not running, only runs the cron jobs defined by root user.

1 Answer 1

  1. check your logs/email?
  2. do man 5 crontab; looks like you have 6 values before your command, while crond only needs 5 followed by command to execute:

    The time and date fields are:

      field          allowed values
      -----          --------------
      minute         0-59
      hour           0-23
      day of month   1-31
      month          1-12 (or names, see below)
      day of week    0-7 (0 or 7 is Sunday, or use names)
  3. try:

30 9 * * 1-5 python pythonfile.py

  • the command is correct in the server. add one more * in the question only.
    – ProgR
    Jun 4, 2018 at 20:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.