More accurate task scheduler
Hi all,
i'm looking for a way to schedule a task at a certain date and time crontab repeats and doesn't have seconds... At doesn't include seconds either ... So i'm basically looking for something that i can either schedule at specific seconds to the future or a specific time HH:MM:SS MMDDYYYY Thanks ! |
First off, I find it odd that there would be a need to launch something at a specific second.
That said, then just create a shell script, use at or cron, and have the shell script execute the sleep command for however many seconds you need, then launch the program you want. So, if you wanted something to start at 10:15:22, set up an at job to kick off at 10:15, and point to a shell script that looks something like: Code:
#!/bin/bash |
Quote:
I thought of doing it this way. But its kinda clumsy cause then i need to pass the script the seconds difference. |
Then pass the number of seconds as an argument to the script. For instance my_special_job 10:15:22
Code:
#!/bin/bash Code:
#!/bin/bash |
Any idea why i'm getting this error ?
"Can't signal atd (permission denied)" when i do atq i see it added to the shched and it also performs the script or task. But it doesnt remove tasks that were already done from the atq list if i run the at command under root it works. |
Do either of these files exist: /etc/at.allow or /etc/at.deny?
If they do, make sure whatever user you need is allowed access. If neither exist, then only root is allowed to use at. |
Quote:
Yeah sorry i didn't mention but i put in the /etc/at.allow the username and the at.deny is empty. Any other suggestions ? |
Did you restart the daemon after adding the user? Or was the user already in the file when the daemon started?
Otherwise, I'm not sure. I'd have to look at the source to get an idea of what can cause that message to be displayed. |
All times are GMT -5. The time now is 02:57 PM. |