New
#11
The full name of that tutorial in the TenForumsTutorial index is
Set OneDrive Files On-Demand Status States in Windows 11 and Windows 10 - ElevenForumsTutorials
Windows 11 is just a modified Windows 10. Many tutorials are the same for both.
All the best,
Denis
Welcome to TenForums.
It's really worth making time to browse through the Tutorial index - there's a shortcut to it at the top of every page.- At the foot of the Tutorial index is a shortcut to download it as a spreadsheet.- Tutorials are also listed by category at Tutorials - there's also a shortcut to that at the top of every page.
- I download a new copy each month.
- By downloading it as a spreadsheet I can benefit from Excel's excellent filtering capabilities when I search for topics of interest.
- Both tutorial lists are searchable.
- You can also search for TenForumsTutorials in many general search engines, such as Google, by adding site:tenforums.com/tutorials after your search term. For example,
taskbar toolbars site:tenforums.com/tutorials
You can search TenForums using the search box in the top-right corner of all TenForums webpages or using Advanced Search - TenForums
- You can also search TenForums threads in many general search engines, such as Google, by adding site:tenforums.com after your search term. For example,
Search for drivers by HardwareID site:tenforums.com
- [This is what the search box in the top-right corner of TenForums webpages does automatically]
Ok, so this is what I've done so far:
- Ensured that OneDrive copies to local files per settings
- Ensured that C:\Windows\System32\config, C:\Windows\System32\config\systemprofile, C:\Windows\SysWOW64\config, and C:\Windows\SysWOW64\config\systemprofile were accessible to all users per windows - Task Scheduler- Batch "Run whether user is logged on or not" not working - Super User
- Scheduled task to run at 1:45pm EST
- Left home to return at 2:30pm EST
The scheduled task still refused to start, much less run. Nothing in the history. There were only 2 variables pertaining to Java that SYSTEM and myself have:
I am out of ideasCode:System.getProperty("JAVA_JDK_HOME") = C:\Program Files\Java\jdk14.0.1\bin System.getProperty("JAVA_CLASS_PATH") = C:\Users\phill\OneDrive\Desktop\classes
I don't see any publicly available Java classes for DandyLabs, is that your employer/client's private code? Meaning no outsider can guess what the run-time requirements for this to work.
Because you say it requires your logon presence, which is triggering some type of credential creation or caching.
There's a mysql component, is the target database hosted locally or on another system? What makes this task require you specifically?
The mysql component is on the same laptop as the Java classes: this laptop. Everything is here.
There are public classes for DandyLabs, and they reside here, and myself ("phill") and SYSTEM should have equal access to it, however, again, if I am logged in, the task runs, but if I'm not, the task does not even start, much less run.. I can't imagine a scenario whereby an outside would need to know anything about the requirements for this class to run inasmuch as only "phill" and SYSTEM should know, as well as all other users on this laptop.
No, what I meant was since this is unpublished code -- we here can't see the inner workings. Everyone is treating the problem as a normal question on "Why doesn't my Scheduled Task work?"
In your screenshots, Task History is enabled. I presume there should be a specific exit condition when the task runs, and upon error, some status or event code. That informs us whether the Task launch had a problem.
If the Task was started, and returned no event error back to Windows; then the non-execution of the Java code has to be related to something that doesn't exist any more after you're logged out.
I was thinking of the Java path (e.g. C:\Program Files (x86)\Common Files\Oracle\Java\java8path). However, that gets set in the System path by default, so that shouldn't be a problem.
I installed Java and downloaded a simple command line tool (csv-2-xml.jar) and verified that I could run it successfully from the command line.
The task worked fine once I changed "Java.exe" to the full path of "C:\Program Files (x86)\Common Files\Oracle\Java\java8path\java.exe". It even worked when set up to run as "NT AUTHORITY\SYSTEM".
I wound up adding an optional to the scheduled task:
2>>C:\Tools\dandylabsblogentryretriever_err.log
When I saved the task with this addition and allowed it to run while I was offline, this time it showed that it did run inasmuch as the error log was created, indicating that a required file in a "locked" directory in C:\users\\phill\\OneDrive\Desktop\\[hidden file]\\[locked file in the Control Panel]\DandyLabsBlogEntryRetriever.properties was not available to the scheduled task (was available in Java, batch script and cmd.exe, even run as TrustedInstaller)