- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Cron Job to enable printer
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2009 06:38 AM
тАО06-24-2009 06:38 AM
Cron Job to enable printer
It does not seem to be working and when I do a ./scriptname I get the error Execute permission denied. I'm not sure where to go from here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2009 06:49 AM
тАО06-24-2009 06:49 AM
Re: Cron Job to enable printer
What are the actual permissions on the script file you have created, i.e. :
/home/markme# ll scriptname
-rwxr-xr-x 1 markme users 20 Jun 24 15:15 scriptname
gba70102:/home/markme#
You need execute permissions on file in order to execute it.
Regards,
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2009 06:49 AM
тАО06-24-2009 06:49 AM
Re: Cron Job to enable printer
Error indicates that, you donot have execute permission on the script. Are u running the script as root user?
Run this command and try to execute the script.
# chmod u+x scriptname
or
# chmod 755 scriptname
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2009 06:51 AM
тАО06-24-2009 06:51 AM
Re: Cron Job to enable printer
'man chmod' for more info on this command :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2009 06:52 AM
тАО06-24-2009 06:52 AM
Re: Cron Job to enable printer
Read the man page for ll "man ll" to see an explanation about permission modes. They are the -rwxr-xr-x that you see in the directory listing with the "ll" command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2009 06:55 AM
тАО06-24-2009 06:55 AM
Re: Cron Job to enable printer
Thanks for the quick responses
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2009 07:03 AM
тАО06-24-2009 07:03 AM
Re: Cron Job to enable printer
It depends upon what is in the actual script ! You will need to ensure that the path for any commands is in included, i.e. set the PATH variable - this often gets overlooked :
#!/sbin/sh
PATH=/usr/sbin:/usr/bin:/sbin
~
~
Regards,
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2009 07:05 AM
тАО06-24-2009 07:05 AM
Re: Cron Job to enable printer
Did you make an entry in cronjob???
If no then make entry for scriptname in cron.
#crontab -e
10 * * * * <script>
It will run script after every 10 minute.
Regards
Sunny
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2009 07:06 AM
тАО06-24-2009 07:06 AM
Re: Cron Job to enable printer
0,5,10,15,20,25,30,35,40,45,50,55 * * * * /usr/bin/cron/scriptname 2>&1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-24-2009 07:11 AM
тАО06-24-2009 07:11 AM
Re: Cron Job to enable printer
You can also check the cron log in /var/adm/cron/log. You will recognize the scriptname and two lines showing the start and end of execution.