What can be reason for getting "execute permission denied" in cronjob in UNIX?

Devjith

I have a shellscript which can be successfully executed in UNIX with command sh Shell_script.sh; but I want it to run automatically. So I just configured a cronjob to run the script using crontab -e.

The cronjob added is below:

0 7-23 * * * * /home/folder1/folder2/Shell_script.sh > /dev/null 2>&1

I want it to be executed hourly from 7AM to 11PM every day.

My shell script has a she-bang #!/bin/bash. I am getting a mail every hour with the content:

Your "cron" job on servername * /home/folder1/folder2/Shell_script.sh > /dev/null 2>&1

produced the following output:

sh: +61: execute permission denied

αғsнιη

You have extra * in your cron line which is interpreting as Username. Once you delete it it will be fine executed.

also consider if your Shell_script.sh is not executable, you need run with sh (if it's written in sh) or bash if it's bash written.

0 7-23 * * * bash /home/folder1/folder2/Shell_script.sh > /dev/null 2>&1

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Why was execute permission denied using GRANT ALL?

From Dev

Failed to spawn bluetooth main process: unable to execute: permission denied

From Dev

Failed to spawn bluetooth main process: unable to execute: permission denied

From Dev

Error creating a subscription and/or schedule - EXECUTE permission was denied on the object

From Dev

Why is execute permission denied for bin file I created?

From Dev

What is the reason of getting model of an object in apache wicket?

From Dev

Data getting overwritten or corrupted. What is the reason?

From Dev

What is the nicest a Unix command can be?

From Dev

What can be the reason to use "controllerAs" property?

From Dev

What is the reason that in git we can refer to HEAD by --?

From Dev

What is a reason of getting error: "Unknown property '' on class MyBean"?

From Dev

what could be reason for client silo not getting initialized in azure?

From Dev

What is a reason of getting error: "Unknown property '' on class MyBean"?

From Dev

Getting cronjob to work in Ubuntu

From Dev

AIX : cannot execute binary file, 0403-006 execute permission denied

From Dev

What Unix commands can be used as a semaphore/lock?

From Dev

What is the reason for the error on running grep.exe (Unix version compiled for Windows) from a batch script?

From Dev

For what reason I can access the resources by curl, but not in the browser?

From Dev

What is the reason you can't use static methods/variables in a class

From Dev

Can this be tail call optimized? If so, what's the special reason for it not happen?

From Dev

The spring JPA is not able to understand this JSON. What can be the reason?

From Dev

What can be a possible reason for segmentation fault in this piece of code?

From Dev

What can be a reason of frequent WiFi connection breaking when the signal is excellent?

From Dev

Can this be tail call optimized? If so, what's the special reason for it not happen?

From Dev

Makefile in linux: what is the reason I can overwrite files without permission?

From Dev

What can be a reason for persist()/merge() to create two rows in database?

From Dev

Getting a TypeError for unknown reason

From Dev

Not getting the reason for the error

From Dev

Can a cronjob be written in a shell?

Related Related

  1. 1

    Why was execute permission denied using GRANT ALL?

  2. 2

    Failed to spawn bluetooth main process: unable to execute: permission denied

  3. 3

    Failed to spawn bluetooth main process: unable to execute: permission denied

  4. 4

    Error creating a subscription and/or schedule - EXECUTE permission was denied on the object

  5. 5

    Why is execute permission denied for bin file I created?

  6. 6

    What is the reason of getting model of an object in apache wicket?

  7. 7

    Data getting overwritten or corrupted. What is the reason?

  8. 8

    What is the nicest a Unix command can be?

  9. 9

    What can be the reason to use "controllerAs" property?

  10. 10

    What is the reason that in git we can refer to HEAD by --?

  11. 11

    What is a reason of getting error: "Unknown property '' on class MyBean"?

  12. 12

    what could be reason for client silo not getting initialized in azure?

  13. 13

    What is a reason of getting error: "Unknown property '' on class MyBean"?

  14. 14

    Getting cronjob to work in Ubuntu

  15. 15

    AIX : cannot execute binary file, 0403-006 execute permission denied

  16. 16

    What Unix commands can be used as a semaphore/lock?

  17. 17

    What is the reason for the error on running grep.exe (Unix version compiled for Windows) from a batch script?

  18. 18

    For what reason I can access the resources by curl, but not in the browser?

  19. 19

    What is the reason you can't use static methods/variables in a class

  20. 20

    Can this be tail call optimized? If so, what's the special reason for it not happen?

  21. 21

    The spring JPA is not able to understand this JSON. What can be the reason?

  22. 22

    What can be a possible reason for segmentation fault in this piece of code?

  23. 23

    What can be a reason of frequent WiFi connection breaking when the signal is excellent?

  24. 24

    Can this be tail call optimized? If so, what's the special reason for it not happen?

  25. 25

    Makefile in linux: what is the reason I can overwrite files without permission?

  26. 26

    What can be a reason for persist()/merge() to create two rows in database?

  27. 27

    Getting a TypeError for unknown reason

  28. 28

    Not getting the reason for the error

  29. 29

    Can a cronjob be written in a shell?

HotTag

Archive